Package-level declarations

Types

Link copied to clipboard
interface CodeService
Link copied to clipboard

Provide authentication and authorization for credential issuance.

Link copied to clipboard
class CredentialIssuer(authorizationService: OAuth2AuthorizationServerAdapter, issuer: Issuer, credentialSchemes: Set<ConstantIndex.CredentialScheme>, publicContext: String = "https://wallet.a-sit.at/credential-issuer", credentialEndpointPath: String = "/credential", credentialProvider: CredentialIssuerDataProvider)

Server implementation to issue credentials using OID4VCI.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class DefaultMapStore<T, U> : MapStore<T, U>

Holds map in memory, protected with a Mutex, to ensure a basic form of thread-safety.

Link copied to clipboard

Holds valid random values in memory, protected with a Mutex, to ensure a basic form of thread-safety.

Link copied to clipboard
interface MapStore<T, U>

Provides a simple map of keys of type T to values of type U. Mainly used in OID4VCI to hold state in the SimpleAuthorizationService and WalletService. Can be implemented to provide replication across different instances of the enclosing application.

Link copied to clipboard
interface NonceService

Provides generation, storage and validation of challenges used throughout the code, e.g. as challenges for presentation of credentials. Can be implemented to provide replication across different instances of the enclosing application.

Link copied to clipboard

Used in OID4VCI by CredentialIssuer to obtain user data when issuing credentials using OID4VCI.

Link copied to clipboard

Interface used in CredentialAuthorizationServiceStrategy to actually load user data when client requests and authorization code.

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
class WalletService(clientId: String = "https://wallet.a-sit.at/app", redirectUrl: String = "/callback", cryptoService: CryptoService = DefaultCryptoService(EphemeralKeyWithoutCert()), jwsService: JwsService = DefaultJwsService(cryptoService), remoteResourceRetriever: RemoteResourceRetrieverFunction = { null }, stateToCodeStore: MapStore<String, String> = DefaultMapStore())

Client service to retrieve credentials using OID4VCI

Properties

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

Functions

Link copied to clipboard
suspend fun JwsService.buildDPoPHeader(url: String, httpMethod: String = "POST", accessToken: String? = null): String

To be set as header DPoP in making request to url, see RFC 9449

Link copied to clipboard
inline fun <T> Parameters.decode(): T
Link copied to clipboard

Reverse functionality of encodeToCredentialIdentifier, which can also handle ISO namespaces, i.e. decodes a single string into a credential scheme and format, e.g. from AtomicAttribute2023#jwt_vc_json to at.asitplus.wallet.lib.data.ConstantIndex.AtomicAttribute2023 and CredentialFormatEnum.JWT_VC

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
Link copied to clipboard

Empty strings can not be decoded by decodeURLQueryComponent, so we'll need to filter it.

Link copied to clipboard