OAuth2KtorClient
Implements the client side of OAuth2
Supported features:
Constructors
Types
Properties
Used to prove possession of the key material for the instance attestation. Also used for the DPoP signing function. (ts3-wallet-unit-attestation 1.5.1)
Returns a new instance attestation to validate the app against an authorization server.
Implements OAuth2 protocol, redirectUrl needs to be registered by the OS for this application, so redirection back from browser works
Functions
Sets the appropriate headers when accessing resourceUrl, by reading data from tokenResponse, i.e. HttpHeaders.Authorization and probably HttpHeaders.DPoP.
Calls the token introspection endpoint (OAuth2AuthorizationServerMetadata.introspectionEndpoint) to check whether the given token is active, returns TokenInfo on success, otherwise throws InvalidToken.
Uses the auth code to request an access token.
Uses a pre-authorized code from the authorization server to request an access token.
Uses the refresh token to request a new access token.
Uses an access token from another client to request a new access token, see RFC8693 OAuth 2.0 Token Exchange.
Builds the authorization request (AuthenticationRequestParameters) to start authentication at the authorization server.
Store the DPoP nonce if it is set, and retry the previous action