OidcSiopVerifier

class OidcSiopVerifier(verifier: Verifier, relyingPartyUrl: String, agentPublicKey: CryptoPublicKey, jwsService: JwsService, verifierJwsService: VerifierJwsService, timeLeewaySeconds: Long = 300, clock: Clock = Clock.System, credentialScheme: ConstantIndex.CredentialScheme? = null, requestedAttributes: List<String>? = null)

Combines Verifiable Presentations with OpenId Connect. Implements OIDC for VP (2023-04-21) as well as SIOP V2 (2023-01-01).

This class creates the Authentication Request, verifier verifies the response. See OidcSiopWallet for the holder.

Constructors

Link copied to clipboard
constructor(verifier: Verifier, relyingPartyUrl: String, agentPublicKey: CryptoPublicKey, jwsService: JwsService, verifierJwsService: VerifierJwsService, timeLeewaySeconds: Long = 300, clock: Clock = Clock.System, credentialScheme: ConstantIndex.CredentialScheme? = null, requestedAttributes: List<String>? = null)

Types

Link copied to clipboard
sealed class AuthnResponseResult
Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun createAuthnRequest(responseMode: String? = null, state: String? = uuid4().toString()): AuthenticationRequestParameters

Creates AuthenticationRequestParameters, to be encoded as query params appended to the URL of the Wallet, e.g. https://example.com?repsonse_type=... (see createAuthnRequestUrl)

Link copied to clipboard
suspend fun createAuthnRequestAsRequestObject(responseMode: String? = null, state: String? = uuid4().toString()): AuthenticationRequestParameters

Creates an JWS Authorization Request (JAR, RFC9101), wrapping the usual AuthenticationRequestParameters.

Link copied to clipboard
fun createAuthnRequestUrl(walletUrl: String, responseMode: String? = null, state: String? = uuid4().toString()): String

Creates an OIDC Authentication Request, encoded as query parameters to the walletUrl.

Link copied to clipboard
suspend fun createAuthnRequestUrlWithRequestObject(walletUrl: String, responseMode: String? = null, state: String? = uuid4().toString()): String

Creates an OIDC Authentication Request, encoded as query parameters to the walletUrl, containing a JWS Authorization Request (JAR, RFC9101), containing the request parameters itself.

Link copied to clipboard

Validates AuthenticationResponseParameters from the Wallet

Validates the OIDC Authentication Response from the Wallet, where url is the whole URL, containing the AuthenticationResponseParameters as the fragment, e.g. https://example.com#id_token=...

Link copied to clipboard

Validates the OIDC Authentication Response from the Wallet, where content are the HTTP POST encoded AuthenticationResponseParameters, e.g. id_token=...&vp_token=...