File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
vck-openid/src/commonMain/kotlin/at/asitplus/wallet/lib/oidvci Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ Release 5.6.4:
4242 - In ` OAuth2Client.createAuthRequest() ` rename ` wrapAsPar ` to ` wrapAsJar ` to match its semantics
4343 - OpenID for Verifiable Credential Issuance:
4444 - Sign authn request as JAR only when AS supports it
45+ - Support extracting ` credential_configuration_id ` from server's authorization details
4546
4647Release 5.6.3:
4748 - OpenID for Verifiable Credential Issuance:
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ class WalletService(
6161 data class KeyAttestationInput (val clientNonce : String? , val supportedAlgorithms : Collection <String >? )
6262
6363
64-
6564 data class RequestOptions (
6665 /* *
6766 * Credential type to request
@@ -215,10 +214,11 @@ class WalletService(
215214
216215 private fun Set<AuthorizationDetails>.toCredentialRequest (): List <CredentialRequestParameters > =
217216 filterIsInstance<OpenIdAuthorizationDetails >().flatMap {
218- require(it.credentialIdentifiers != null ) { " credential_identifiers are null" }
219- it.credentialIdentifiers!! .map {
220- CredentialRequestParameters (credentialIdentifier = it)
221- }
217+ it.credentialIdentifiers?.let {
218+ it.map { CredentialRequestParameters (credentialIdentifier = it) }
219+ } ? : it.credentialConfigurationId?.let {
220+ listOf (CredentialRequestParameters (credentialConfigurationId = it))
221+ } ? : throw IllegalArgumentException (" Authorization details can't be parsed: $it " )
222222 }
223223
224224 private fun String.toCredentialRequest (metadata : IssuerMetadata ): Set <CredentialRequestParameters > =
You can’t perform that action at this time.
0 commit comments