TJwtMiddleware.Create Constructor
Overloads
- TJwtMiddleware.Create
- TJwtMiddleware.Create(string, Boolean, Boolean)
- TJwtMiddleware.Create(TBytes, Boolean, Boolean)
TJwtMiddleware.Create
Creates a new middleware instance with an empty secret.
Syntax
Unit: Sparkle.Middleware.Jwt
constructor TJwtMiddleware.Create;
See also
TJwtMiddleware.Create(string, Boolean, Boolean)
Creates a new middleware instance with the specified secret provided as a string.
Syntax
Unit: Sparkle.Middleware.Jwt
constructor TJwtMiddleware.Create(const ASecret: string; AForbidAnonymousAccess: Boolean = False; AAllowExpiredToken: Boolean = False);
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | ASecret | string | The secret (key), UTF-8 encoded, used to validate the token signature. |
| AForbidAnonymousAccess | Boolean | Optional: Default value is False When True, requests without a valid token are rejected. Defaults to False. |
|
| AAllowExpiredToken | Boolean | Optional: Default value is False When True, an expired token is still accepted as valid. Defaults to False. |
See also
TJwtMiddleware.Create(TBytes, Boolean, Boolean)
Creates a new middleware instance with the specified secret provided as a byte array.
Syntax
Unit: Sparkle.Middleware.Jwt
constructor TJwtMiddleware.Create(const ASecret: TBytes; AForbidAnonymousAccess: Boolean = False; AAllowExpiredToken: Boolean = False);
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | ASecret | TBytes | The secret (key) used to validate the token signature. |
| AForbidAnonymousAccess | Boolean | Optional: Default value is False When True, requests without a valid token are rejected. Defaults to False. |
|
| AAllowExpiredToken | Boolean | Optional: Default value is False When True, an expired token is still accepted as valid. Defaults to False. |