AuthenticationRequestParameters

@Serializable
data class AuthenticationRequestParameters(val responseType: String? = null, val clientId: String? = null, val redirectUrl: String? = null, val scope: String? = null, val state: String? = null, val nonce: String? = null, val claims: AuthnRequestClaims? = null, val clientMetadata: RelyingPartyMetadata? = null, val clientMetadataUri: String? = null, val idTokenHint: String? = null, val request: String? = null, val requestUri: String? = null, val idTokenType: String? = null, val presentationDefinition: PresentationDefinition? = null, val presentationDefinitionUrl: String? = null, val authorizationDetails: Set<AuthorizationDetails>? = null, val clientIdScheme: OpenIdConstants.ClientIdScheme? = null, val walletIssuer: String? = null, val userHint: String? = null, val issuerState: String? = null, val responseMode: OpenIdConstants.ResponseMode? = null, val responseUrl: String? = null, val audience: String? = null, val issuer: String? = null, val issuedAt: Instant? = null, val resource: String? = null, val codeChallenge: String? = null, val codeChallengeMethod: String? = null)(source)

Contents of an OIDC Authentication Request.

Usually, these parameters are appended to the Authorization Endpoint URL of the OpenId Provider (may be the Wallet App in case of SIOPv2, or the Credential Issuer for OID4VCI).

Constructors

Link copied to clipboard
constructor(responseType: String? = null, clientId: String? = null, redirectUrl: String? = null, scope: String? = null, state: String? = null, nonce: String? = null, claims: AuthnRequestClaims? = null, clientMetadata: RelyingPartyMetadata? = null, clientMetadataUri: String? = null, idTokenHint: String? = null, request: String? = null, requestUri: String? = null, idTokenType: String? = null, presentationDefinition: PresentationDefinition? = null, presentationDefinitionUrl: String? = null, authorizationDetails: Set<AuthorizationDetails>? = null, clientIdScheme: OpenIdConstants.ClientIdScheme? = null, walletIssuer: String? = null, userHint: String? = null, issuerState: String? = null, responseMode: OpenIdConstants.ResponseMode? = null, responseUrl: String? = null, audience: String? = null, issuer: String? = null, issuedAt: Instant? = null, resource: String? = null, codeChallenge: String? = null, codeChallengeMethod: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "aud")
val audience: String? = null

OAuth 2.0 JAR: If signed, the Authorization Request Object SHOULD contain the Claims iss (issuer) and aud (audience) as members with their semantics being the same as defined in the JWT (RFC7519) specification. The value of aud should be the value of the authorization server (AS) issuer, as defined in RFC 8414.

Link copied to clipboard
@SerialName(value = "authorization_details")
val authorizationDetails: Set<AuthorizationDetails>? = null

RFC9396: The request parameter authorization_details contains, in JSON notation, an array of objects. Each JSON object contains the data to specify the authorization requirements for a certain type of resource. The type of resource or access requirement is determined by the AuthorizationDetails.type field.

Link copied to clipboard
@SerialName(value = "claims")
val claims: AuthnRequestClaims? = null

OIDC: OPTIONAL. This parameter is used to request that specific Claims be returned. The value is a JSON object listing the requested Claims.

Link copied to clipboard
@SerialName(value = "client_id")
val clientId: String? = null

OIDC: REQUIRED. OAuth 2.0 Client Identifier valid at the Authorization Server.

Link copied to clipboard
@SerialName(value = "client_id_scheme")
val clientIdScheme: OpenIdConstants.ClientIdScheme? = null

OID4VP: OPTIONAL. A string identifying the scheme of the value in the client_id Authorization Request parameter (Client Identifier scheme). The clientIdScheme parameter namespaces the respective Client Identifier. If an Authorization Request uses the clientIdScheme parameter, the Wallet MUST interpret the Client Identifier of the Verifier in the context of the Client Identifier scheme. If the parameter is not present, the Wallet MUST behave as specified in RFC6749. If the same Client Identifier is used with different Client Identifier schemes, those occurrences MUST be treated as different Verifiers. Note that the Verifier needs to determine which Client Identifier schemes the Wallet supports prior to sending the Authorization Request in order to choose a supported scheme.

Link copied to clipboard
@SerialName(value = "client_metadata")
val clientMetadata: RelyingPartyMetadata? = null

OIDC SIOPv2: OPTIONAL. This parameter is used by the RP to provide information about itself to a Self-Issued OP that would normally be provided to an OP during Dynamic RP Registration. It MUST not be present if the RP uses OpenID Federation 1.0 Automatic Registration to pass its metadata.

Link copied to clipboard
@SerialName(value = "client_metadata_uri")
val clientMetadataUri: String? = null

OIDC SIOPv2: OPTIONAL. This parameter is used by the RP to provide information about itself to a Self-Issued OP that would normally be provided to an OP during Dynamic RP Registration. It MUST not be present if the RP uses OpenID Federation 1.0 Automatic Registration to pass its metadata.

Link copied to clipboard
@SerialName(value = "code_challenge")
val codeChallenge: String? = null

RFC7636: A challenge derived from the code verifier that is sent in the authorization request, to be verified against later.

Link copied to clipboard
@SerialName(value = "code_challenge_method")
val codeChallengeMethod: String? = null

RFC7636: A method that was used to derive code challenge.

Link copied to clipboard
@SerialName(value = "id_token_hint")
val idTokenHint: String? = null

OIDC: OPTIONAL. ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. If the End-User identified by the ID Token is logged in or is logged in by the request, then the Authorization Server returns a positive response; otherwise, it SHOULD return an error, such as login_required.

Link copied to clipboard
@SerialName(value = "id_token_type")
val idTokenType: String? = null

OIDC SIOPv2: OPTIONAL. Space-separated string that specifies the types of ID Token the RP wants to obtain, with the values appearing in order of preference. The allowed individual values are subject_signed_id_token and attester_signed_id_token. The default value is attester_signed_id_token. The RP determines the type if ID Token returned based on the comparison of the iss and sub claims values. In order to preserve compatibility with existing OpenID Connect deployments, the OP MAY return an ID Token that does not fulfill the requirements as expressed in this parameter. So the RP SHOULD be prepared to reliably handle such an outcome.

Link copied to clipboard
@SerialName(value = "iat")
@Serializable(with = InstantLongSerializer::class)
val issuedAt: Instant? = null

OPTIONAL. Time at which the request was issued.

Link copied to clipboard
@SerialName(value = "iss")
val issuer: String? = null

OAuth 2.0 JAR: If signed, the Authorization Request Object SHOULD contain the Claims iss (issuer) and aud (audience) as members with their semantics being the same as defined in the JWT (RFC7519) specification. The value of aud should be the value of the authorization server (AS) issuer, as defined in RFC 8414.

Link copied to clipboard
@SerialName(value = "issuer_state")
val issuerState: String? = null

OID4VP: OPTIONAL. String value identifying a certain processing context at the Credential Issuer. A value for this parameter is typically passed in a Credential Offer from the Credential Issuer to the Wallet. This request parameter is used to pass the issuer_state value back to the Credential Issuer.

Link copied to clipboard
@SerialName(value = "nonce")
val nonce: String? = null

OIDC: OPTIONAL. String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token. Sufficient entropy MUST be present in the nonce values used to prevent attackers from guessing values.

Link copied to clipboard
@SerialName(value = "presentation_definition")
val presentationDefinition: PresentationDefinition? = null

OID4VP: A string containing a Presentation Definition JSON object. This parameter MUST be present when presentationDefinitionUrl parameter, or a scope value representing a Presentation Definition is not present.

Link copied to clipboard
@SerialName(value = "presentation_definition_uri")
val presentationDefinitionUrl: String? = null

OID4VP: A string containing an HTTPS URL pointing to a resource where a Presentation Definition JSON object can be retrieved. This parameter MUST be present when presentationDefinition parameter, or a scope value representing a Presentation Definition is not present.

Link copied to clipboard
@SerialName(value = "redirect_uri")
val redirectUrl: String? = null

OIDC: REQUIRED. Redirection URI to which the response will be sent. This URI MUST exactly match one of the Redirection URI values for the Client pre-registered at the OpenID Provider, with the matching performed as described in Section 6.2.1 of RFC3986 (Simple String Comparison).

Link copied to clipboard
@SerialName(value = "request")
val request: String? = null

OAuth 2.0 JAR: REQUIRED unless request_uri is specified. The Request Object that holds authorization request parameters stated in Section 4 of RFC6749 (OAuth 2.0). If this parameter is present in the authorization request, request_uri MUST NOT be present.

Link copied to clipboard
@SerialName(value = "request_uri")
val requestUri: String? = null

OAuth 2.0 JAR: REQUIRED unless request is specified. The absolute URI, as defined by RFC3986, that is the Request Object URI referencing the authorization request parameters stated in Section 4 of RFC6749 (OAuth 2.0). If this parameter is present in the authorization request, request MUST NOT be present.

Link copied to clipboard
@SerialName(value = "resource")
val resource: String? = null

RFC8707: In requests to the authorization server, a client MAY indicate the protected resource (a.k.a. resource server, application, API, etc.) to which it is requesting access. Its value MUST be an absolute URI, as specified by Section 4.3 of (RFC3986).

Link copied to clipboard
@SerialName(value = "response_mode")
val responseMode: OpenIdConstants.ResponseMode? = null

OAuth 2.0 Responses: OPTIONAL. Informs the Authorization Server of the mechanism to be used for returning Authorization Response parameters from the Authorization Endpoint. This use of this parameter is NOT RECOMMENDED with a value that specifies the same Response Mode as the default Response Mode for the Response Type used.

Link copied to clipboard
@SerialName(value = "response_type")
val responseType: String? = null

OIDC: REQUIRED. OAuth 2.0 Response Type value that determines the authorization processing flow to be used, including what parameters are returned from the endpoints used. When using the Authorization Code Flow, this value is code.

Link copied to clipboard
@SerialName(value = "response_uri")
val responseUrl: String? = null

OID4VP: OPTIONAL. The Response URI to which the Wallet MUST send the Authorization Response using an HTTPS POST request as defined by the Response Mode direct_post. The Response URI receives all Authorization Response parameters as defined by the respective Response Type. When the response_uri parameter is present, the redirect_uri Authorization Request parameter MUST NOT be present. If the redirect_uri Authorization Request parameter is present when the Response Mode is direct_post, the Wallet MUST return an invalid_request Authorization Response error.

Link copied to clipboard
@SerialName(value = "scope")
val scope: String? = null

OIDC: REQUIRED. OpenID Connect requests MUST contain the openid scope value. If the openid scope value is not present, the behavior is entirely unspecified. Other scope values MAY be present. Scope values used that are not understood by an implementation SHOULD be ignored. e.g. profile or com.example.healthCardCredential

Link copied to clipboard
@SerialName(value = "state")
val state: String? = null

OIDC: RECOMMENDED. Opaque value used to maintain state between the request and the callback. Typically, Cross-Site Request Forgery (CSRF, XSRF) mitigation is done by cryptographically binding the value of this parameter with a browser cookie.

Link copied to clipboard
@SerialName(value = "user_hint")
val userHint: String? = null

OID4VP: OPTIONAL. String containing an opaque End-User hint that the Wallet MAY use in subsequent callbacks to optimize the End-User's experience. This is RECOMMENDED in Dynamic Credential Requests.

Link copied to clipboard
@SerialName(value = "wallet_issuer")
val walletIssuer: String? = null

OID4VP: OPTIONAL. String containing the Wallet's identifier. The Credential Issuer can use the discovery process defined in SIOPv2 to determine the Wallet's capabilities and endpoints, using the wallet_issuer value as the Issuer Identifier referred to in SIOPv2. This is RECOMMENDED in Dynamic Credential Requests.

Functions

Link copied to clipboard