Skip to content

Commit

Permalink
OIDC4VCI with sd-jwt, attribuite '_sd_alg' is optional #2693
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed May 29, 2024
1 parent b3972be commit aca6a28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/oidc4vc/add_oidc4vc_credential.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Future<void> addOIDC4VCCredential({
final jsonContent = jwtDecode.parseJwt(data);

if (format == VCFormatType.vcSdJWT.vcValue) {
final sdAlg = jsonContent['_sd_alg'];
final sdAlg = jsonContent['_sd_alg']??'sha-256';

if (sdAlg == null || sdAlg != 'sha-256') {
if (sdAlg != 'sha-256') {
throw ResponseMessage(
data: {
'error': 'invalid_request',
Expand Down

0 comments on commit aca6a28

Please sign in to comment.