decodeCredentialResponse
suspend fun decodeCredentialResponse(response: String, isEncrypted: Boolean, request: OpenId4VciClient.CredentialRequest, representation: CredentialRepresentation): KmmResult<Collection<ReceivedCredential>>(source)
Decodes response received from the credential issuer like decodeCredentialResponse, reading it as a compact JWE if isEncrypted, i.e. if its media type is application/jwt.
suspend fun decodeCredentialResponse(response: OpenId4VciServer.CredentialResponse, request: OpenId4VciClient.CredentialRequest, representation: CredentialRepresentation): KmmResult<Collection<ReceivedCredential>>(source)
Decodes response received from the credential issuer for request into one ReceivedCredential per credential, encoded in representation, also for one that can not be decoded, so that no member of a batch goes unnoticed. Validates nothing: prepare the storage of each one with ReceivedCredential.prepareCredentialStorage, which validates it with the holder's key and validator.
Fails only for the response itself: if it is not encrypted exactly when request asked for an encrypted response, or if it can not be decrypted.