TsgcHTTP_JWT_Server › Events
Events you can handle, grouped by purpose, followed by the full alphabetical list.
| Name | Description |
|---|---|
| OnJWTBeforeRequest | Fired for every incoming HTTP/WebSocket request before any JWT processing; set Cancel=True to bypass JWT validation for this connection. |
| OnJWTUnauthorized | Fired when the request has no valid JWT and is about to be rejected; set Disconnect=False to still accept it (for example, CORS pre-flight requests). |
| OnJWTException | Fired when an exception is raised while decoding or validating the token so the application can log the error. |
| OnJWTResponseError | Fired just before the Unauthorized HTTP response is sent, allowing the code (default 401), text (default "Unauthorized") and headers to be customized. |
| Name | Description |
|---|---|
| OnJWTBeforeValidateToken | Fired after a Bearer token is extracted and before it is validated; set Cancel=True to skip validation (the request is then treated as authorized). |
| OnJWTBeforeValidateSignature | Fired after the JWT is decoded and before its signature is verified, exposing the decoded Header and Payload and allowing the validation Secret / PublicKey to be overridden per token. |
| OnJWTAfterValidateToken | Fired after the signature and claim validations run; inspect Header, Payload and Error, and flip the Valid flag to accept or reject the token. |
| Name | Description |
|---|---|
| OnJWTAfterValidateToken | Fired after the signature and claim validations run; inspect Header, Payload and Error, and flip the Valid flag to accept or reject the token. |
| OnJWTBeforeRequest | Fired for every incoming HTTP/WebSocket request before any JWT processing; set Cancel=True to bypass JWT validation for this connection. |
| OnJWTBeforeValidateSignature | Fired after the JWT is decoded and before its signature is verified, exposing the decoded Header and Payload and allowing the validation Secret / PublicKey to be overridden per token. |
| OnJWTBeforeValidateToken | Fired after a Bearer token is extracted and before it is validated; set Cancel=True to skip validation (the request is then treated as authorized). |
| OnJWTException | Fired when an exception is raised while decoding or validating the token so the application can log the error. |
| OnJWTResponseError | Fired just before the Unauthorized HTTP response is sent, allowing the code (default 401), text (default "Unauthorized") and headers to be customized. |
| OnJWTUnauthorized | Fired when the request has no valid JWT and is about to be rejected; set Disconnect=False to still accept it (for example, CORS pre-flight requests). |