SimpleAuthorizationService
Simple authorization server implementation, to be used for CredentialIssuer, with the actual authentication and authorization logic for credential schemes implemented in strategy.
Implemented from OpenID for Verifiable Credential Issuance 1.0 from 2025-09-16. Also implements necessary parts of OpenID4VC HAIP , Draft 03, 2025-02-07, e.g. OAuth 2.0 Pushed Authorization Requests, Proof Key for Code Exchange by OAuth Public Clients, OAuth 2.0 Demonstrating Proof of Possession (DPoP), OAuth 2.0 Attestation-Based Client Authentication OAuth 2.0 Token Introspection OAuth 2.0 Token Exchange
Constructors
Properties
Used in several fields in OAuth2AuthorizationServerMetadata, to provide endpoint URLs to clients.
Functions
Builds the authentication response for this specific user from loadUserFun. Send this result as HTTP Header Location in a 302 response to the client.
Offer all available schemes from strategy to clients.
Offer all available schemes from strategy to clients.
If this is an internal AS, provide a fresh DPoP nonce for clients.
Obtains information about the token, since we're in-memory here (as an OAuth2AuthorizationServerAdapter, we can directly access our tokenService.
Obtains a JSON object representing at.asitplus.openid.OidcUserInfo from the Authorization Server, and since we're implementing OAuth2AuthorizationServerAdapter here, this is the same as userInfo.
Serve this result JSON-serialized under /.well-known/openid-configuration, see OpenIdConstants.WellKnownPaths.OpenidConfiguration, and under /.well-known/oauth-authorization-server, see OpenIdConstants.WellKnownPaths.OauthAuthorizationServer.
Pushed authorization request endpoint as defined in RFC 9126. Clients send their authorization request as HTTP POST with application/x-www-form-urlencoded to the AS.
Verifies the authorization code sent by the client and issues an access token, uses tokenService. Send this value JSON-serialized back to the client.
RFC7662: OAuth 2.0 Token Introspection
Returns the user info associated with this access token, when the token in authorizationHeader is correct.
Validates the access token sent to CredentialIssuer.credential.