Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AuthorizationDetails(val type: String, val format: CredentialFormatEnum, val docType: String? = null, val claims: Map<String, Map<String, RequestedCredentialClaimSpecification>>? = null, val types: Array<String>, val locations: Array<String>? = null)

To be contained in an array sent in parameter authorization_details from the Wallet to the Issuer

Link copied to clipboard
interface CodeService
Link copied to clipboard
Link copied to clipboard
@Serializable
data class CredentialRequestParameters(val format: CredentialFormatEnum, val types: Array<String> = arrayOf(), val docType: String? = null, val claims: Map<String, Map<String, RequestedCredentialClaimSpecification>>? = null, val proof: CredentialRequestProof? = null)
Link copied to clipboard
@Serializable
data class CredentialRequestProof(val proofType: String, val jwt: String)
Link copied to clipboard
@Serializable
data class CredentialResponseParameters(val format: CredentialFormatEnum, val credential: String? = null, val acceptanceToken: String? = null, val clientNonce: String? = null, val clientNonceExpiresIn: Int? = null)
Link copied to clipboard
@Serializable
data class CredentialSubjectMetadataSingle(val mandatory: Boolean? = null, val valueType: String? = null, val display: DisplayProperties? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
data class DisplayProperties(val name: String? = null, val locale: String? = null)

OID4VCI: OPTIONAL. An array of objects, where each object contains display properties of a Credential Issuer for a certain language.

Link copied to clipboard
@Serializable
data class IssuerMetadata(val issuer: String, val credentialIssuer: String? = null, val authorizationServer: String? = null, val credentialEndpointUrl: String? = null, val tokenEndpointUrl: String? = null, val jsonWebKeySetUrl: String? = null, val authorizationEndpointUrl: String, val batchCredentialEndpointUrl: String? = null, val supportedCredentialFormat: Array<SupportedCredentialFormat>? = null, val displayProperties: Array<DisplayProperties>? = null, val responseTypesSupported: Array<String>? = null, val scopesSupported: Array<String>? = null, val subjectTypesSupported: Array<String>? = null, val idTokenSigningAlgorithmsSupported: Array<String>? = null, val requestObjectSigningAlgorithmsSupported: Array<String>? = null, val subjectSyntaxTypesSupported: Array<String>? = null, val idTokenTypesSupported: Array<@Serializable(with = IdTokenTypeSerializer::class) IdTokenType>? = null, val presentationDefinitionUriSupported: Boolean = true, val vpFormatsSupported: VpFormatsSupported? = null, val clientIdSchemesSupported: Array<String>? = null)

To be serialized into /.well-known/openid-credential-issuer

Link copied to clipboard
class IssuerService(issuer: Issuer, credentialSchemes: Collection<ConstantIndex.CredentialScheme>, codeService: CodeService = DefaultCodeService(), tokenService: TokenService = DefaultTokenService(), clientNonceService: NonceService = DefaultNonceService(), authorizationServer: String? = null, publicContext: String = "https://wallet.a-sit.at/", authorizationEndpointPath: String = "/authorize", tokenEndpointPath: String = "/token", credentialEndpointPath: String = "/credential")

Server implementation to issue credentials using OpenID for Verifiable Credential Issuance. Implemented from Draft openid-4-verifiable-credential-issuance-1_0-11, 2023-02-03.

Link copied to clipboard
interface NonceService
Link copied to clipboard
@Serializable
data class OAuth2Error(val error: String, val errorDescription: String? = null, val errorUri: String? = null)

Source: https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html OpenID for Verifiable Credential Issuance Published: 3 February 2023

Link copied to clipboard
class OAuth2Exception(val error: String, val errorDescription: String? = null) : Throwable
Link copied to clipboard
typealias Parameters = Map<String, String>
Link copied to clipboard
@Serializable
data class SupportedAlgorithmsContainer(val supportedAlgorithms: Array<String>)
Link copied to clipboard
@Serializable
data class SupportedCredentialFormat(val format: CredentialFormatEnum, val id: String? = null, val types: Array<String>, val credentialSubject: Map<String, CredentialSubjectMetadataSingle>? = null, val docType: String? = null, val claims: Map<String, Map<String, RequestedCredentialClaimSpecification>>? = null, val order: Array<String>? = null, val supportedBindingMethods: Array<String>, val supportedCryptographicSuites: Array<String>)

OID4VCI: A JSON array containing a list of JSON objects, each of them representing metadata about a separate credential type that the Credential Issuer can issue. The JSON objects in the array MUST conform to the structure of the Section 10.2.3.1.

Link copied to clipboard
@Serializable
data class TokenRequestParameters(val grantType: String, val code: String, val redirectUrl: String, val clientId: String, val preAuthorizedCode: String? = null, val codeVerifier: String? = null, val userPin: String? = null)
Link copied to clipboard
@Serializable
data class TokenResponseParameters(val accessToken: String, val refreshToken: String? = null, val tokenType: String, val expires: Int, val scope: String? = null, val clientNonce: String? = null, val clientNonceExpiresIn: Int? = null, val authorizationPending: Boolean? = null, val interval: Int? = null)
Link copied to clipboard
interface TokenService
Link copied to clipboard
@Serializable
data class VpFormatsSupported(val vcJwt: SupportedAlgorithmsContainer? = null, val vcJsonLd: SupportedAlgorithmsContainer? = null, val jsonLinkedData: SupportedAlgorithmsContainer? = null)

OID4VP: An object containing a list of key value pairs, where the key is a string identifying a Credential format supported by the Wallet. Valid Credential format identifier values are defined in Annex E of OpenID.VCI. Other values may be used when defined in the profiles of this specification.

Link copied to clipboard
class WalletService(credentialScheme: ConstantIndex.CredentialScheme, clientId: String = "https://wallet.a-sit.at/app", redirectUrl: String = "/callback", cryptoService: CryptoService = DefaultCryptoService(), jwsService: JwsService = DefaultJwsService(cryptoService))

Client service to retrieve credentials using OpenID for Verifiable Credential Issuance. Implemented from Draft openid-4-verifiable-credential-issuance-1_0-11, 2023-02-03.

Properties

Link copied to clipboard
val json: Json
Link copied to clipboard
val jsonSerializer: Json

Functions

Link copied to clipboard
inline fun <T> Parameters.decode(): T
Link copied to clipboard
inline fun <T> String.decodeFromPostBody(): T
Link copied to clipboard
inline fun <T> String.decodeFromUrlQuery(): T
Link copied to clipboard
Link copied to clipboard
fun Parameters.formUrlEncode(): <Error class: unknown class>