Package-level declarations
Types
Client authentication service for an OAuth2.0 AS, based on Attestation-Based Client Authentication, see validate.
Authenticated OAuth 2.0 client
Provides interface for implementing an OAuth 2.0 Authorization Server, which may be used with an at.asitplus.wallet.lib.oidvci.OAuth2AuthorizationServerAdapter for a at.asitplus.wallet.lib.oidvci.OpenId4VciServer.
Strategy to implement authorization for credential requests (with scope or OpenIdAuthorizationDetails) in SimpleAuthorizationService.
Simple bearer token generation (just a nonce) for an OAuth 2.0 authorization server.
Combines simple bearer tokens from BearerTokenGenerationService and BearerTokenVerificationService.
Verifies Bearer tokens that have been generated by BearerTokenGenerationService. This does only work for internal authorization servers, because we could not store the actual user data otherwise.
How a client authenticates with OAuth 2.0 Attestation-Based Client Authentication: the instance attestation loaded by loadInstanceAttestation, and the keyMaterial it attests. Both belong together, as the attestation MUST reference keyMaterial in its cnf claim, which OAuth2ProtocolClient checks before using it.
The report of a client attestation and its proof of possession, see ClientAttestationChecks, and the authenticated client, if it has been accepted.
Handles authenticating the OAuth 2.0 client for an OAuth 2.0 authorization server, see SimpleAuthorizationService and subclasses of this interface.
Extracted information from at.asitplus.openid.AuthenticationRequestParameters, to store what the client has initially requested (which scope and/or authnDetails), and which userInfo is associated with that request.
Simple DPoP token generation for an OAuth 2.0 authorization server, with OpenId4VciAccessToken as payload.
Combines sender-constrained JWT tokens from JwtTokenGenerationService and JwtTokenVerificationService.
Verifies JWT tokens that have been generated by JwtTokenGenerationService, as OpenId4VciAccessToken.
Does not verify the client authentication at all
Simple OAuth 2.0 client to authorize the client against an OAuth 2.0 Authorization Server and request tokens.
Implements the client side of OAuth 2.0, without sending any HTTP request itself: every call returns an HttpExchange, whose requests the caller sends with any HTTP stack. The KDoc of each method lists the ProtocolRequests its exchange sends; brackets mark optional requests, and {1,3} means the first attempt plus up to two retries.
Internal class used to store pushed authorization requests created for clients in SimpleAuthorizationService.requestUriToPushedAuthorizationRequest, which are referenced by a request_uri and fetched later on in the process.
Holds information about the HTTP request the client has made, to validate client authentication.
Implements RFC 9449 8.2.: Authorization servers may include a fresh DPoP nonce by including values in HTTP 200 responses, and OA-ABCA 6.2 likewise for attestation challenges.
Simple authorization server implementation, to be used for OpenId4VciServer, with the actual authentication and authorization logic for credential schemes implemented in strategy.
Strategy to generate access tokens, to use in SimpleAuthorizationService.
Access token service that combines generation and verification, i.e., it is suitable to be used in an implementation of an OAuth 2.0 Authorization Server.
Verifies access tokens and refresh tokens, that may have been generated by a TokenGenerationService, or by any other OAuth 2.0 authorization server.
Self-stated client ID, not verified in any way
Internal class representing issued tokens and tokens presented by clients that have been verified successfully.
Functions
Extracts the header OAuth-Client-Attestation-Challenge from the headers of an error response, if the error is use_attestation_challenge.
Extracts the header DPoP-Nonce from the headers of an error response, if the authorization server responded with the error use_dpop_nonce, or the resource server did so in the header WWW-Authenticate.
Converts the challenge to the response of the challenge endpoint: status 200 with the challenge as JSON, and Cache-Control: no-store (OA-ABCA 6.1).
Converts the authorization server metadata to the response of /.well-known/oauth-authorization-server (and /.well-known/openid-configuration): status 200 with the metadata as JSON (RFC 8414 3.2).
Converts the result of the token introspection endpoint to its response: status 200 with the TokenIntrospectionResponse as JSON (RFC 7662 2.2), or the JWT of the TokenIntrospectionJwtResponse as application/token-introspection+jwt (RFC 9701 5.).
Converts the result of the pushed authorization request endpoint to its response: status 201 with the parameters as JSON (RFC 9126 2.2), and the headers DPoP-Nonce and OAuth-Client-Attestation-Challenge, if present.
Converts the result of the token endpoint to its response: status 200 with the token response as JSON, the headers Cache-Control: no-store and Pragma: no-cache (RFC 6749 5.1), and the headers DPoP-Nonce and OAuth-Client-Attestation-Challenge, if present.
Converts the result of the userinfo endpoint to its response: status 200 with the user info as JSON (OpenID Connect Core 5.3.2), and the header DPoP-Nonce, if present.
Converts this error of an authorization server endpoint (pushed authorization request, token, token introspection, attestation challenge, authorization) to the response to send: status 400 with the toOAuth2Error as JSON (RFC 6749 5.2), including the header DPoP-Nonce for OAuth2Exception.UseDpopNonce (RFC 9449 8.) and OAuth-Client-Attestation-Challenge for OAuth2Exception.UseAttestationChallenge (OA-ABCA 7.4).
Converts the result of the authorization endpoint to its response: a redirect with status 302 to the client's redirect URI in Location (RFC 6749 4.1.2).
Converts this error of a resource endpoint accessed with an access token (credential, userinfo) to the response to send, with the toOAuth2Error as JSON: