Package-level declarations

Types

Link copied to clipboard

Intermediate DTO to hold the parsed clientMetadata as well as the created params in Success.

Link copied to clipboard

Possible outcomes of creating an OpenID Authentication Response, to be sent back to the verifier.

Link copied to clipboard
data class AuthnResponseResult(val idTokenValidationResult: KmmResult<IdToken>?, val vpTokenValidationResult: KmmResult<VpTokenValidationResult>?, val request: AuthenticationRequestParameters?)

Result of validating an OpenID authentication response. Use to inspect how a wallet response was parsed and whether presentation validation succeeded.

Link copied to clipboard
@Serializable
data class AuthorizationResponsePreparationState(val request: RequestParametersFrom<AuthenticationRequestParameters>, val credentialPresentationRequest: CredentialPresentationRequest?, val clientMetadata: RelyingPartyMetadata?, val jsonWebKeys: Collection<JsonWebKey>?, val requestObjectVerified: Boolean?, val verifierInfo: List<VerifierInfo>?)

Intermediate result class to display information about the authentication process to the user, i.e., to let them make an informed decision.

Link copied to clipboard
sealed class ClientIdScheme

Represents the OpenID client identifier scheme used to validate verifier identity. Use to select the client-id flavor (redirect URI, X.509, attestation) and derive IDs/URIs accordingly.

Link copied to clipboard

This interface represents the result of matching a CredentialPresentationRequest against a list of available credentials

Link copied to clipboard

This is a helper class to build a CredentialPresentationRequest from a collection of RequestOptionsCredential to be used in OpenId4VpRequestOptions.

Link copied to clipboard
Link copied to clipboard
class OpenId4VpHolder(keyMaterial: KeyMaterial = EphemeralKeyWithoutCert(), holder: Holder = HolderAgent(keyMaterial), signIdToken: SignJwtFun<IdToken> = SignJwt(keyMaterial, JwsHeaderCertOrJwk()), encryptJarm: EncryptJweFun = EncryptJwe(keyMaterial), supportedAlgorithms: Set<SignatureAlgorithm> = setOf(SignatureAlgorithm.ECDSAwithSHA256), signDeviceAuthDetached: SignCoseDetachedFun<ByteArray> = SignCoseDetached(keyMaterial, CoseHeaderNone(), CoseHeaderNone()), clock: Clock = Clock.System, clientId: String = "https://wallet.a-sit.at/", authorizationEndpoint: String = "openid4vp:", remoteResourceRetriever: RemoteResourceRetrieverFunction = { null }, requestObjectJwsVerifier: RequestObjectJwsVerifier = RequestObjectJwsVerifier { _ -> true }, walletNonceMapStore: MapStore<String, String> = DefaultMapStore(), randomSource: RandomSource = RandomSource.Secure, lookupJsonWebKeysForClient: (OpenId4VpHolder.JsonWebKeyLookupInput) -> JsonWebKeySet? = { null })

Combines Verifiable Presentations with OAuth 2.0. Implements OpenID4VP (1.0, 2025-07-09) as well as SIOP V2 (D13, 2023-11-28).

Link copied to clipboard
data class OpenId4VpRequestOptions(val presentationRequest: CredentialPresentationRequest?, val responseMode: OpenIdConstants.ResponseMode = ResponseMode.Fragment, val responseUrl: String? = null, val responseType: String = VP_TOKEN, val state: String = uuid4().toString(), val transactionData: List<TransactionData>? = null, val expectedOrigins: List<String>? = null, val populateClientId: Boolean = true, val verifierMetadataMode: VerifierMetadataMode = VerifierMetadataMode.AUTO) : RequestOptions
Link copied to clipboard
class OpenId4VpVerifier(clientIdScheme: ClientIdScheme, keyMaterial: KeyMaterial = EphemeralKeyWithoutCert(), val verifier: Verifier = VerifierAgent(identifier = clientIdScheme.clientId), decryptionKeyMaterial: KeyMaterial = EphemeralKeyWithoutCert(), decryptJwe: DecryptJweFun = DecryptJwe(decryptionKeyMaterial), signAuthnRequest: SignJwtFun<AuthenticationRequestParameters> = SignJwt(keyMaterial, JwsHeaderClientIdScheme(clientIdScheme)), verifyJwsObject: VerifyJwsObjectFun = VerifyJwsObject(), supportedAlgorithms: Set<SignatureAlgorithm> = setOf(SignatureAlgorithm.ECDSAwithSHA256), verifyCoseSignature: VerifyCoseSignatureWithKeyFun<ByteArray> = VerifyCoseSignatureWithKey(), timeLeewaySeconds: Long = 300, clock: Clock = Clock.System, nonceService: NonceService = DefaultNonceService(), stateToAuthnRequestStore: MapStore<String, AuthenticationRequestParameters> = DefaultMapStore(), supportedJweEncryptionAlgorithms: Set<JweEncryption> = JweEncryption.entries.toSet()) : AbstractMdocVerifier

Combines Verifiable Presentations with OAuth 2.0. Implements OpenID4VP (1.0, 2025-07-09) as well as SIOP V2 (D13, 2023-11-28).

Link copied to clipboard
class RequestParser(remoteResourceRetriever: RemoteResourceRetrieverFunction = { null }, requestObjectJwsVerifier: RequestObjectJwsVerifier = RequestObjectJwsVerifier { _: Any -> true }, buildRequestObjectParameters: suspend () -> RequestObjectParameters? = { null })
Link copied to clipboard
class ResponseParser(decryptJwe: DecryptJweFun = DecryptJwe(EphemeralKeyWithoutCert()), verifyJwsObject: VerifyJwsObjectFun = VerifyJwsObject())

Parses authentication responses for OpenId4VpVerifier

Link copied to clipboard
sealed interface VpTokenValidationResult
Link copied to clipboard
data class VpTokenValidationResultDCQL(val credentialQueryResponseValidations: Map<DCQLCredentialQueryIdentifier, List<KmmResult<Verifier.VerifyPresentationResult>>>, val submissionRequirementsValidationResult: KmmResult<Unit>) : VpTokenValidationResult

Functions