OpenId4VpHolder

class OpenId4VpHolder(    holder: Holder,     agentPublicKey: CryptoPublicKey,     jwsService: JwsService,     coseService: CoseService,     clock: Clock = Clock.System,     clientId: String = "https://wallet.a-sit.at/",     remoteResourceRetriever: RemoteResourceRetrieverFunction,     requestObjectJwsVerifier: RequestObjectJwsVerifier,     walletNonceMapStore: MapStore<String, String> = DefaultMapStore())(source)

Combines Verifiable Presentations with OpenId Connect. Implements OpenID for VP (2024-12-02) as well as SIOP V2 (2023-11-28).

The holder creates the Authentication Response, see OpenId4VpVerifier for the verifier.

Constructors

Link copied to clipboard
constructor(    holder: Holder,     agentPublicKey: CryptoPublicKey,     jwsService: JwsService,     coseService: CoseService,     clock: Clock = Clock.System,     clientId: String = "https://wallet.a-sit.at/",     remoteResourceRetriever: RemoteResourceRetrieverFunction,     requestObjectJwsVerifier: RequestObjectJwsVerifier,     walletNonceMapStore: MapStore<String, String> = DefaultMapStore())
constructor(    keyMaterial: KeyMaterial = EphemeralKeyWithoutCert(),     holder: Holder = HolderAgent(keyMaterial),     jwsService: JwsService = DefaultJwsService(DefaultCryptoService(keyMaterial)),     coseService: CoseService = DefaultCoseService(DefaultCryptoService(keyMaterial)),     clock: Clock = Clock.System,     clientId: String = "https://wallet.a-sit.at/",     remoteResourceRetriever: RemoteResourceRetrieverFunction = { null },     requestObjectJwsVerifier: RequestObjectJwsVerifier = RequestObjectJwsVerifier { _ -> true },     walletNonceMapStore: MapStore<String, String> = DefaultMapStore())

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Pass in the deserialized AuthenticationRequestParameters, which were either encoded as query params, or JSON serialized as a JWT Request Object.

Pass in the URL sent by the Verifier (containing the at.asitplus.openid.AuthenticationRequestParameters as query parameters), to create AuthenticationResponseResult that can be sent back to the Verifier, see AuthenticationResponseResult.

Link copied to clipboard

Creates the authentication response from the RP's params

Link copied to clipboard
suspend fun finalizeAuthorizationResponse(    request: RequestParametersFrom<AuthenticationRequestParameters>,     clientMetadata: RelyingPartyMetadata?,     credentialPresentation: CredentialPresentation?): KmmResult<AuthenticationResponseResult>

Finalize the authorization response

Link copied to clipboard
suspend fun <T : RequestParameters> finalizeAuthorizationResponseParameters(    request: RequestParametersFrom<T>,     clientMetadata: RelyingPartyMetadata?,     credentialPresentation: CredentialPresentation?): KmmResult<AuthenticationResponse>

Finalize the authorization response parameters

Link copied to clipboard

Pass in the URL sent by the Verifier (containing the at.asitplus.openid.AuthenticationRequestParameters as query parameters), to create at.asitplus.openid.AuthenticationResponseParameters that can be sent back to the Verifier, see AuthenticationResponseResult.

Link copied to clipboard

Starts the authorization response building process from the RP's authentication request in params

Starts the authorization response building process from the RP's authentication request in input