OAuth2KtorClient
Implements the client side of OAuth2
Supported features:
Constructors
Types
Used in OAuth2KtorClient.loadInstanceAttestation to provide information about the authorization server.
Properties
Return a new Wallet Instance Attestation (WIA) to authenticate the Wallet App to the Authorization Service with OAuth Attestation Based Client Auth. Returned JWT MUST reference keyMaterial in JsonWebToken.confirmationClaim.
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.