TsgcHTTP_OAuth2_Client › Events

TsgcHTTP_OAuth2_Client Events

Events you can handle, grouped by purpose, followed by the full alphabetical list.

Authorize Code

NameDescription
OnBeforeAuthorizeCodeFires before the client opens the browser to request user authorization.
OnAfterAuthorizeCodeFires when the authorization server redirects back with the authorization code.
OnErrorAuthorizeCodeFires when the authorization server returns an error during the authorization code step.

Access Token

NameDescription
OnBeforeAccessTokenFires before the client posts to the token endpoint to exchange the code for an access token.
OnAfterAccessTokenFires when the token endpoint returns a successful access-token response.
OnErrorAccessTokenFires when the token endpoint rejects the access-token request.

Refresh Token

NameDescription
OnBeforeRefreshTokenFires before the client posts to the token endpoint to redeem the refresh token.
OnAfterRefreshTokenFires when the token endpoint returns a new access token from a refresh_token grant.
OnErrorRefreshTokenFires when the token endpoint rejects the refresh_token grant.

Revoke Token

NameDescription
OnBeforeRevokeTokenFires before the client posts to the revocation endpoint (RFC 7009).
OnAfterRevokeTokenFires after the revocation endpoint successfully invalidates the token.
OnErrorRevokeTokenFires when the revocation endpoint returns an error.

Introspect Token

NameDescription
OnBeforeIntrospectTokenFires before the client posts to the introspection endpoint (RFC 7662).
OnAfterIntrospectTokenFires after the introspection endpoint returns the token metadata.
OnErrorIntrospectTokenFires when the introspection endpoint returns an error.

Device Code

NameDescription
OnDeviceCodeFires when the Device Code flow issues the user code that must be entered on a secondary device (RFC 8628).
OnDeviceCodeExpiredFires when the device code expires before the user completes authorization.

DPoP

NameDescription
OnDPoPSignFires when a DPoP proof needs to be signed, allowing the application to override the default signing implementation.

HTTP

NameDescription
OnHTTPResponseFires just before the local HTTP server sends the browser-facing response after the authorization redirect.

All Events (alphabetical)

NameDescription
OnAfterAccessTokenFires when the token endpoint returns a successful access-token response.
OnAfterAuthorizeCodeFires when the authorization server redirects back with the authorization code.
OnAfterIntrospectTokenFires after the introspection endpoint returns the token metadata.
OnAfterRefreshTokenFires when the token endpoint returns a new access token from a refresh_token grant.
OnAfterRevokeTokenFires after the revocation endpoint successfully invalidates the token.
OnBeforeAccessTokenFires before the client posts to the token endpoint to exchange the code for an access token.
OnBeforeAuthorizeCodeFires before the client opens the browser to request user authorization.
OnBeforeIntrospectTokenFires before the client posts to the introspection endpoint (RFC 7662).
OnBeforeRefreshTokenFires before the client posts to the token endpoint to redeem the refresh token.
OnBeforeRevokeTokenFires before the client posts to the revocation endpoint (RFC 7009).
OnDeviceCodeFires when the Device Code flow issues the user code that must be entered on a secondary device (RFC 8628).
OnDeviceCodeExpiredFires when the device code expires before the user completes authorization.
OnDPoPSignFires when a DPoP proof needs to be signed, allowing the application to override the default signing implementation.
OnErrorAccessTokenFires when the token endpoint rejects the access-token request.
OnErrorAuthorizeCodeFires when the authorization server returns an error during the authorization code step.
OnErrorIntrospectTokenFires when the introspection endpoint returns an error.
OnErrorRefreshTokenFires when the token endpoint rejects the refresh_token grant.
OnErrorRevokeTokenFires when the revocation endpoint returns an error.
OnHTTPResponseFires just before the local HTTP server sends the browser-facing response after the authorization redirect.