package
6.0.0-beta.10+incompatible
Repository: https://github.com/nuts-foundation/nuts-node.git
Documentation: pkg.go.dev

# Functions

DefaultOpenIDSupportedFormats returns the OpenID formats supported by the Nuts node and is used in the - Authorization Server's metadata field `vp_formats_supported` - Client's metadata field `vp_formats` TODO: spec is very unclear about this part.
IssuerIdToWellKnown converts the OAuth2 Issuer identity to the specified well-known endpoint by inserting the well-known at the root of the path.
NewTokenResponse is a convenience function for creating a TokenResponse with the given parameters.
TestOAuthErrorCode tests if the response is an OAuth2 error with the given code.

# Constants

AccessDenied is returned wthen the resource owner or authorization server denied the request.
AccessTokenRequestStatusActive is the status for an active access token.
AccessTokenRequestStatusPending is the status for a pending access token.
AssertionParam is the parameter name for the assertion parameter.
AuthorizationCodeGrantType is the grant_type for the authorization_code grant type.
AuthorizationDetailsParam is the parameter name for the authorization_details parameter.
AuthzServerWellKnown is the well-known base path for the oauth authorization server metadata as defined in RFC8414.
CallbackPath is the node specific callback for an OAuth flow.
ClientIDParam is the parameter name for the client_id parameter.
ClientIDSchemeParam is the parameter name for the client_id_scheme parameter.
ClientMetadataParam is the parameter name for the client_metadata parameter.
ClientMetadataPath is the path to the client metadata relative to the complete did:web URL.
ClientMetadataURIParam is the parameter name for the client_metadata_uri parameter.
CNonceParam is the parameter name for the c_nonce parameter.
CodeChallengeMethodParam is the parameter name for the code_challenge_method parameter.
CodeChallengeParam is the parameter name for the code_challenge parameter.
CodeParam is the parameter name for the code parameter.
CodeResponseType is the parameter name for the code parameter.
CodeVerifierParam is the parameter name for the code_verifier parameter.
ErrorDescriptionParam is the parameter name for the error_description parameter.
ErrorParam is the parameter name for the error parameter.
GrantTypeParam is the parameter name for the grant_type parameter.
InvalidDPopProof is returned when the DPoP proof is invalid or missing.
InvalidGrant is returned when the authorization grant or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
InvalidPresentationDefinitionURI is returned when the requested presentation definition URI is invalid or can't be reached.
InvalidRequest is returned when the request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.
InvalidRequestObject is returned when the JAR Request Object signature validation or decryption fails.
InvalidRequestURI is returned whn the request_uri in the authorization request returns an error or contains invalid data.
InvalidRequestURIMethod is returned when the request_uri_method is not 'get' or 'post'.
InvalidScope is returned when the requested scope is invalid, unknown or malformed.
NonceParam is the parameter name for the nonce parameter.
OpenIdCredIssuerWellKnown is the well-known base path for the openID credential issuer metadata as defined in OpenID4VCI specification.
PreAuthorizedCodeGrantType is the grant_type for the pre-authorized_code grant type.
PresentationDefParam is the parameter name for the OpenID4VP presentation_definition parameter.
PresentationDefUriParam is the parameter name for the OpenID4VP presentation_definition_uri parameter.
PresentationSubmissionParam is the parameter name for the presentation_submission parameter.
RedirectURIParam is the parameter name for the redirect_uri parameter.
RequestParam is the parameter name for the request parameter.
RequestURIMethodParam states what http method (get/post) should be used for RequestURIParam.
RequestURIParam is the parameter name for the request parameter.
ResponseModeParam is the parameter name for the OAuth2 response_mode parameter.
ResponseTypeParam is the parameter name for the response_type parameter.
ResponseURIParam is the parameter name for the OpenID4VP response_uri parameter.
ScopeParam is the parameter name for the scope parameter.
ServerError is returned when the Authorization Server encounters an unexpected condition that prevents it from fulfilling the request.
StateParam is the parameter name for the state parameter.
UnsupportedGrantType is returned when the authorization grant type is not supported by the authorization server.
UnsupportedResponseType is returned when the authorization server does not support obtaining an authorization code using this method.
VpTokenGrantType is the grant_type for the vp_token-bearer grant type.
VpTokenParam is the parameter name for the vp_token parameter.
VPTokenResponseType is paramter name for the vp_token repsponse type.
WalletMetadataParam is used by the wallet to provide its metadata in an authorization request when RequestURIMethodParam is 'post'.
WalletNonceParam is a wallet generated nonce to prevent authorization request replay when RequestURIMethodParam is 'post'.

# Structs

AuthorizationServerMetadata defines the OAuth Authorization Server metadata.
OAuth2Error is an OAuth2 error that signals the error was (probably) caused by the client (e.g.
Oauth2ErrorWriter is a HTTP response writer for OAuth errors.
OAuthClientMetadata defines the OAuth Client metadata.
OpenIDCredentialIssuerMetadata represents the metadata of an OpenID credential issuer.
Redirect is the response from the verifier on the direct_post authorization response.
TokenResponse is the OAuth access token response.

# Type aliases

ErrorCode specifies error codes as defined by the OAuth2 specifications.