diff --git a/packages/oid4vci-holder/README.md b/packages/oid4vci-holder/README.md index 637166b57..11d4224c4 100644 --- a/packages/oid4vci-holder/README.md +++ b/packages/oid4vci-holder/README.md @@ -20,9 +20,9 @@ pre-authorized_code ```typescript agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: 'openid-initiate-issuance://?issuer=https%3A%2F%2Fissuer.research.identiproof.io&credential_type=OpenBadgeCredentialUrl&pre-authorized_code=4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp&user_pin_required=true' - } + requestData: { + uri: 'openid-initiate-issuance://?issuer=https%3A%2F%2Fissuer.research.identiproof.io&credential_type=OpenBadgeCredentialUrl&pre-authorized_code=4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp&user_pin_required=true', + }, }) ``` @@ -32,9 +32,9 @@ pre-authorized_code ```typescript agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: 'openid-credential-offer://?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D' - } + requestData: { + uri: 'openid-credential-offer://?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D', + }, }) ``` @@ -44,9 +44,9 @@ authorization_code: ```typescript agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: 'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%22issuer_state%22%3A%22eyJhbGciOiJSU0Et...FYUaBy%22%7D%7D%7D' - } + requestData: { + uri: 'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%22issuer_state%22%3A%22eyJhbGciOiJSU0Et...FYUaBy%22%7D%7D%7D', + }, }) ``` @@ -54,9 +54,9 @@ pre-authorized_code: ```typescript agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: 'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D' - } + requestData: { + uri: 'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D', + }, }) ``` diff --git a/packages/oid4vci-holder/__tests__/shared/MetadataMocks.ts b/packages/oid4vci-holder/__tests__/shared/MetadataMocks.ts index c99a31bb8..2cf5bf6f9 100644 --- a/packages/oid4vci-holder/__tests__/shared/MetadataMocks.ts +++ b/packages/oid4vci-holder/__tests__/shared/MetadataMocks.ts @@ -1,1305 +1,821 @@ export const GET_INITIATION_DATA_PRE_AUTHORIZED_HTTPS_INITIATE_FLOW = { - "credentialBranding": {}, - "credentialsSupported": [], - "openID4VCIClientState": { - "authorizationRequestOpts": { - "redirectUri": "openid-credential-offer://" + credentialBranding: {}, + credentialsSupported: [], + openID4VCIClientState: { + authorizationRequestOpts: { + redirectUri: 'openid-credential-offer://', }, - "credentialIssuer": "https://issuer.research.identiproof.io", - "credentialOffer": { - "baseUrl": "https://issuer.research.identiproof.io", - "credential_offer": { - "credential_issuer": "https://issuer.research.identiproof.io", - "credentials": [ - "OpenBadgeCredentialUrl", - "VerifiableCredential" - ], - "grants": { - "urn:ietf:params:oauth:grant-type:pre-authorized_code": { - "pre-authorized_code": "4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp", - "user_pin_required": true - } - } + credentialIssuer: 'https://issuer.research.identiproof.io', + credentialOffer: { + baseUrl: 'https://issuer.research.identiproof.io', + credential_offer: { + credential_issuer: 'https://issuer.research.identiproof.io', + credentials: ['OpenBadgeCredentialUrl', 'VerifiableCredential'], + grants: { + 'urn:ietf:params:oauth:grant-type:pre-authorized_code': { + 'pre-authorized_code': + '4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp', + user_pin_required: true, + }, + }, }, - "original_credential_offer": { - "credential_type": [ - "OpenBadgeCredentialUrl", - "VerifiableCredential" - ], - "issuer": "https://issuer.research.identiproof.io", - "pre-authorized_code": "4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp", - "user_pin_required": "true" + original_credential_offer: { + credential_type: ['OpenBadgeCredentialUrl', 'VerifiableCredential'], + issuer: 'https://issuer.research.identiproof.io', + 'pre-authorized_code': + '4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp', + user_pin_required: 'true', }, - "preAuthorizedCode": "4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp", - "scheme": "https", - "supportedFlows": [ - "Pre-Authorized Code Flow" - ], - "userPinRequired": true, - "version": 1008 + preAuthorizedCode: + '4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp', + scheme: 'https', + supportedFlows: ['Pre-Authorized Code Flow'], + userPinRequired: true, + version: 1008, }, - "endpointMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + endpointMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, + }, + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, + pkce: { + codeChallengeMethod: 'S256', + disabled: false, }, - "pkce": { - "codeChallengeMethod": "S256", - "disabled": false - } }, - "serverMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + serverMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, + }, + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" - } + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, } export const GET_INITIATION_DATA_PRE_AUTHORIZED_OPENID_CREDENTIAL_OFFER = { - "credentialBranding": {}, - "credentialsSupported": [], - "openID4VCIClientState": { - "authorizationRequestOpts": { - "redirectUri": "openid-credential-offer://" + credentialBranding: {}, + credentialsSupported: [], + openID4VCIClientState: { + authorizationRequestOpts: { + redirectUri: 'openid-credential-offer://', }, - "credentialIssuer": "https://issuer.research.identiproof.io", - "credentialOffer": { - "baseUrl": "openid-credential-offer://", - "credential_offer": { - "credential_issuer": "https://issuer.research.identiproof.io", - "credentials": [ + credentialIssuer: 'https://issuer.research.identiproof.io', + credentialOffer: { + baseUrl: 'openid-credential-offer://', + credential_offer: { + credential_issuer: 'https://issuer.research.identiproof.io', + credentials: [ { - "format": "jwt_vc_json", - "types": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] - } + format: 'jwt_vc_json', + types: ['VerifiableCredential', 'UniversityDegreeCredential'], + }, ], - "grants": { - "urn:ietf:params:oauth:grant-type:pre-authorized_code": { - "pre-authorized_code": "adhjhdjajkdkhjhdj", - "user_pin_required": true - } - } + grants: { + 'urn:ietf:params:oauth:grant-type:pre-authorized_code': { + 'pre-authorized_code': 'adhjhdjajkdkhjhdj', + user_pin_required: true, + }, + }, }, - "original_credential_offer": { - "credential_issuer": "https://issuer.research.identiproof.io", - "credentials": [ + original_credential_offer: { + credential_issuer: 'https://issuer.research.identiproof.io', + credentials: [ { - "format": "jwt_vc_json", - "types": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] - } + format: 'jwt_vc_json', + types: ['VerifiableCredential', 'UniversityDegreeCredential'], + }, ], - "grants": { - "urn:ietf:params:oauth:grant-type:pre-authorized_code": { - "pre-authorized_code": "adhjhdjajkdkhjhdj", - "user_pin_required": true - } - } + grants: { + 'urn:ietf:params:oauth:grant-type:pre-authorized_code': { + 'pre-authorized_code': 'adhjhdjajkdkhjhdj', + user_pin_required: true, + }, + }, }, - "preAuthorizedCode": "adhjhdjajkdkhjhdj", - "scheme": "openid-credential-offer", - "supportedFlows": [ - "Pre-Authorized Code Flow" - ], - "userPinRequired": true, - "version": 1011 + preAuthorizedCode: 'adhjhdjajkdkhjhdj', + scheme: 'openid-credential-offer', + supportedFlows: ['Pre-Authorized Code Flow'], + userPinRequired: true, + version: 1011, }, - "endpointMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + endpointMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, + }, + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, + pkce: { + codeChallengeMethod: 'S256', + disabled: false, }, - "pkce": { - "codeChallengeMethod": "S256", - "disabled": false - } }, - "serverMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + serverMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, + }, + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" - } + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, } export const GET_INITIATION_DATA_PRE_AUTHORIZED_OPENID_INITIATE_ISSUANCE = { - "credentialBranding": {}, - "credentialsSupported": [], - "openID4VCIClientState": { - "authorizationRequestOpts": { - "redirectUri": "openid-credential-offer://" + credentialBranding: {}, + credentialsSupported: [], + openID4VCIClientState: { + authorizationRequestOpts: { + redirectUri: 'openid-credential-offer://', }, - "credentialIssuer": "https://issuer.research.identiproof.io", - "credentialOffer": { - "baseUrl": "openid-initiate-issuance://", - "credential_offer": { - "credential_issuer": "https://issuer.research.identiproof.io", - "credentials": [ - "OpenBadgeCredentialUrl", - "VerifiableCredential" - ], - "grants": { - "urn:ietf:params:oauth:grant-type:pre-authorized_code": { - "pre-authorized_code": "4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp", - "user_pin_required": true - } - } + credentialIssuer: 'https://issuer.research.identiproof.io', + credentialOffer: { + baseUrl: 'openid-initiate-issuance://', + credential_offer: { + credential_issuer: 'https://issuer.research.identiproof.io', + credentials: ['OpenBadgeCredentialUrl', 'VerifiableCredential'], + grants: { + 'urn:ietf:params:oauth:grant-type:pre-authorized_code': { + 'pre-authorized_code': + '4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp', + user_pin_required: true, + }, + }, }, - "original_credential_offer": { - "credential_type": [ - "OpenBadgeCredentialUrl", - "VerifiableCredential" - ], - "issuer": "https://issuer.research.identiproof.io", - "pre-authorized_code": "4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp", - "user_pin_required": "true" + original_credential_offer: { + credential_type: ['OpenBadgeCredentialUrl', 'VerifiableCredential'], + issuer: 'https://issuer.research.identiproof.io', + 'pre-authorized_code': + '4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp', + user_pin_required: 'true', }, - "preAuthorizedCode": "4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp", - "scheme": "openid-initiate-issuance", - "supportedFlows": [ - "Pre-Authorized Code Flow" - ], - "userPinRequired": true, - "version": 1008 + preAuthorizedCode: + '4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp', + scheme: 'openid-initiate-issuance', + supportedFlows: ['Pre-Authorized Code Flow'], + userPinRequired: true, + version: 1008, }, - "endpointMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + endpointMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, + }, + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, + pkce: { + codeChallengeMethod: 'S256', + disabled: false, }, - "pkce": { - "codeChallengeMethod": "S256", - "disabled": false - } }, - "serverMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + serverMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, + }, + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" - } + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, } export const GET_INITIATION_DATA_AUTHORIZATION_CODE_HTTPS = { - "authorizationCodeURL": expect.any(String), - "credentialBranding": {}, - "credentialsSupported": [], - "openID4VCIClientState": { - "authorizationRequestOpts": { - "redirectUri": "openid-credential-offer://" + authorizationCodeURL: expect.any(String), + credentialBranding: {}, + credentialsSupported: [], + openID4VCIClientState: { + authorizationRequestOpts: { + redirectUri: 'openid-credential-offer://', }, - "authorizationURL": expect.any(String), - "credentialIssuer": "https://issuer.research.identiproof.io", - "credentialOffer": { - "baseUrl": "https://issuer.research.identiproof.io", - "credential_offer": { - "credential_issuer": "https://issuer.research.identiproof.io", - "credentials": [ + authorizationURL: expect.any(String), + credentialIssuer: 'https://issuer.research.identiproof.io', + credentialOffer: { + baseUrl: 'https://issuer.research.identiproof.io', + credential_offer: { + credential_issuer: 'https://issuer.research.identiproof.io', + credentials: [ { - "format": "jwt_vc_json", - "types": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] - } + format: 'jwt_vc_json', + types: ['VerifiableCredential', 'UniversityDegreeCredential'], + }, ], - "grants": { - "authorization_code": { - "issuer_state": "eyJhbGciOiJSU0Et...FYUaBy" - } - } + grants: { + authorization_code: { + issuer_state: 'eyJhbGciOiJSU0Et...FYUaBy', + }, + }, }, - "issuerState": "eyJhbGciOiJSU0Et...FYUaBy", - "original_credential_offer": { - "credential_issuer": "https://issuer.research.identiproof.io", - "credentials": [ + issuerState: 'eyJhbGciOiJSU0Et...FYUaBy', + original_credential_offer: { + credential_issuer: 'https://issuer.research.identiproof.io', + credentials: [ { - "format": "jwt_vc_json", - "types": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] - } + format: 'jwt_vc_json', + types: ['VerifiableCredential', 'UniversityDegreeCredential'], + }, ], - "grants": { - "authorization_code": { - "issuer_state": "eyJhbGciOiJSU0Et...FYUaBy" - } - } + grants: { + authorization_code: { + issuer_state: 'eyJhbGciOiJSU0Et...FYUaBy', + }, + }, }, - "scheme": "https", - "supportedFlows": [ - "Authorization Code Flow" - ], - "userPinRequired": false, - "version": 1011 + scheme: 'https', + supportedFlows: ['Authorization Code Flow'], + userPinRequired: false, + version: 1011, }, - "endpointMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + endpointMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, + }, + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "deferred_credential_endpoint": undefined, - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + deferred_credential_endpoint: undefined, + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, + pkce: { + codeChallenge: expect.any(String), + codeChallengeMethod: 'S256', + codeVerifier: expect.any(String), + disabled: false, }, - "pkce": { - "codeChallenge": expect.any(String), - "codeChallengeMethod": "S256", - "codeVerifier": expect.any(String), - "disabled": false - } }, - "serverMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + serverMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, + }, + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" - } + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, } export const GET_INITIATION_DATA_PRE_AUTHORIZED_CODE_HTTPS = { - "credentialBranding": {}, - "credentialsSupported": [], - "openID4VCIClientState": { - "authorizationRequestOpts": { - "redirectUri": "openid-credential-offer://" + credentialBranding: {}, + credentialsSupported: [], + openID4VCIClientState: { + authorizationRequestOpts: { + redirectUri: 'openid-credential-offer://', }, - "credentialIssuer": "https://issuer.research.identiproof.io", - "credentialOffer": { - "baseUrl": "https://issuer.research.identiproof.io", - "credential_offer": { - "credential_issuer": "https://issuer.research.identiproof.io", - "credentials": [ + credentialIssuer: 'https://issuer.research.identiproof.io', + credentialOffer: { + baseUrl: 'https://issuer.research.identiproof.io', + credential_offer: { + credential_issuer: 'https://issuer.research.identiproof.io', + credentials: [ { - "format": "jwt_vc_json", - "types": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] - } + format: 'jwt_vc_json', + types: ['VerifiableCredential', 'UniversityDegreeCredential'], + }, ], - "grants": { - "urn:ietf:params:oauth:grant-type:pre-authorized_code": { - "pre-authorized_code": "adhjhdjajkdkhjhdj", - "user_pin_required": true - } - } + grants: { + 'urn:ietf:params:oauth:grant-type:pre-authorized_code': { + 'pre-authorized_code': 'adhjhdjajkdkhjhdj', + user_pin_required: true, + }, + }, }, - "original_credential_offer": { - "credential_issuer": "https://issuer.research.identiproof.io", - "credentials": [ + original_credential_offer: { + credential_issuer: 'https://issuer.research.identiproof.io', + credentials: [ { - "format": "jwt_vc_json", - "types": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] - } + format: 'jwt_vc_json', + types: ['VerifiableCredential', 'UniversityDegreeCredential'], + }, ], - "grants": { - "urn:ietf:params:oauth:grant-type:pre-authorized_code": { - "pre-authorized_code": "adhjhdjajkdkhjhdj", - "user_pin_required": true - } - } + grants: { + 'urn:ietf:params:oauth:grant-type:pre-authorized_code': { + 'pre-authorized_code': 'adhjhdjajkdkhjhdj', + user_pin_required: true, + }, + }, }, - "preAuthorizedCode": "adhjhdjajkdkhjhdj", - "scheme": "https", - "supportedFlows": [ - "Pre-Authorized Code Flow" - ], - "userPinRequired": true, - "version": 1011 + preAuthorizedCode: 'adhjhdjajkdkhjhdj', + scheme: 'https', + supportedFlows: ['Pre-Authorized Code Flow'], + userPinRequired: true, + version: 1011, }, - "endpointMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + endpointMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, + }, + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, + pkce: { + codeChallengeMethod: 'S256', + disabled: false, }, - "pkce": { - "codeChallengeMethod": "S256", - "disabled": false - } }, - "serverMetadata": { - "authorizationServerMetadata": { - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "code_challenge_methods_supported": [ - "S256" - ], - "grant_types_supported": [ - "authorization_code", - "urn:ietf:params:oauth:grant-type:pre-authorized_code", - "client_credentials", - "refresh_token" - ], - "introspection_endpoint": "https://auth.research.identiproof.io/oauth2/introspect", - "introspection_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "issuer": "https://auth.research.identiproof.io", - "jwks_uri": "https://auth.research.identiproof.io/oauth2/jwks", - "response_types_supported": [ - "code" - ], - "revocation_endpoint": "https://auth.research.identiproof.io/oauth2/revoke", - "revocation_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ], - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token", - "token_endpoint_auth_methods_supported": [ - "client_secret_basic", - "client_secret_post", - "client_secret_jwt", - "private_key_jwt" - ] + serverMetadata: { + authorizationServerMetadata: { + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + code_challenge_methods_supported: ['S256'], + grant_types_supported: ['authorization_code', 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'client_credentials', 'refresh_token'], + introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', + introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + issuer: 'https://auth.research.identiproof.io', + jwks_uri: 'https://auth.research.identiproof.io/oauth2/jwks', + response_types_supported: ['code'], + revocation_endpoint: 'https://auth.research.identiproof.io/oauth2/revoke', + revocation_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + token_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], }, - "authorizationServerType": "OID4VCI", - "authorization_endpoint": "https://auth.research.identiproof.io/oauth2/authorize", - "authorization_server": "https://auth.research.identiproof.io", - "credentialIssuerMetadata": { - "authorization_server": "https://auth.research.identiproof.io", - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "credentials_supported": { - "Cyber Security Certificate": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "Cyber Security Certificate" - ] - } - } + authorizationServerType: 'OID4VCI', + authorization_endpoint: 'https://auth.research.identiproof.io/oauth2/authorize', + authorization_server: 'https://auth.research.identiproof.io', + credentialIssuerMetadata: { + authorization_server: 'https://auth.research.identiproof.io', + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + credentials_supported: { + 'Cyber Security Certificate': { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'Cyber Security Certificate'], + }, + }, }, - "OpenBadgeCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeCredential" - ] - } - } + OpenBadgeCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeCredential'], + }, + }, + }, + OpenBadgeExtendedCredential: { + formats: { + jwt_vc: { + cryptographic_binding_methods_supported: ['did'], + cryptographic_suites_supported: ['ES256'], + types: ['VerifiableCredential', 'OpenBadgeExtendedCredential'], + }, + }, }, - "OpenBadgeExtendedCredential": { - "formats": { - "jwt_vc": { - "cryptographic_binding_methods_supported": [ - "did" - ], - "cryptographic_suites_supported": [ - "ES256" - ], - "types": [ - "VerifiableCredential", - "OpenBadgeExtendedCredential" - ] - } - } - } }, - "issuer": "https://issuer.research.identiproof.io", - "jwks_uri": "https://issuer.research.identiproof.io/.well-known/did.json" + issuer: 'https://issuer.research.identiproof.io', + jwks_uri: 'https://issuer.research.identiproof.io/.well-known/did.json', }, - "credential_endpoint": "https://issuer.research.identiproof.io/credential", - "issuer": "https://issuer.research.identiproof.io", - "token_endpoint": "https://auth.research.identiproof.io/oauth2/token" - } + credential_endpoint: 'https://issuer.research.identiproof.io/credential', + issuer: 'https://issuer.research.identiproof.io', + token_endpoint: 'https://auth.research.identiproof.io/oauth2/token', + }, } -export const IDENTIPROOF_ISSUER_URL = 'https://issuer.research.identiproof.io'; -export const IDENTIPROOF_AS_URL = 'https://auth.research.identiproof.io'; +export const IDENTIPROOF_ISSUER_URL = 'https://issuer.research.identiproof.io' +export const IDENTIPROOF_AS_URL = 'https://auth.research.identiproof.io' export const IDENTIPROOF_AS_METADATA = { issuer: 'https://auth.research.identiproof.io', @@ -1314,7 +830,7 @@ export const IDENTIPROOF_AS_METADATA = { introspection_endpoint: 'https://auth.research.identiproof.io/oauth2/introspect', introspection_endpoint_auth_methods_supported: ['client_secret_basic', 'client_secret_post', 'client_secret_jwt', 'private_key_jwt'], code_challenge_methods_supported: ['S256'], -}; +} export const IDENTIPROOF_OID4VCI_METADATA = { issuer: 'https://issuer.research.identiproof.io', @@ -1350,4 +866,4 @@ export const IDENTIPROOF_OID4VCI_METADATA = { }, }, }, -}; +} diff --git a/packages/oid4vci-holder/__tests__/shared/oid4vciHolderLogicAgentLogic.ts b/packages/oid4vci-holder/__tests__/shared/oid4vciHolderLogicAgentLogic.ts index e63ea5ae1..2bf15e636 100644 --- a/packages/oid4vci-holder/__tests__/shared/oid4vciHolderLogicAgentLogic.ts +++ b/packages/oid4vci-holder/__tests__/shared/oid4vciHolderLogicAgentLogic.ts @@ -1,7 +1,7 @@ import { TAgent } from '@veramo/core' import { IOID4VCIHolder } from '../../src' -import {AccessTokenResponse, WellKnownEndpoints} from "@sphereon/oid4vci-common"; -import nock = require("nock"); +import { AccessTokenResponse, WellKnownEndpoints } from '@sphereon/oid4vci-common' +import nock = require('nock') import { GET_INITIATION_DATA_AUTHORIZATION_CODE_HTTPS, GET_INITIATION_DATA_PRE_AUTHORIZED_CODE_HTTPS, @@ -10,8 +10,9 @@ import { IDENTIPROOF_AS_METADATA, IDENTIPROOF_AS_URL, IDENTIPROOF_ISSUER_URL, - IDENTIPROOF_OID4VCI_METADATA, GET_INITIATION_DATA_PRE_AUTHORIZED_HTTPS_INITIATE_FLOW -} from "./MetadataMocks"; + IDENTIPROOF_OID4VCI_METADATA, + GET_INITIATION_DATA_PRE_AUTHORIZED_HTTPS_INITIATE_FLOW, +} from './MetadataMocks' type ConfiguredAgent = TAgent @@ -22,28 +23,33 @@ const mockedAccessTokenResponse: AccessTokenResponse = { c_nonce_expires_in: 2025101300, interval: 2025101300, token_type: 'Bearer', -}; +} const mockedVC = - 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL2V4YW1wbGVzL3YxIl0sImlkIjoiaHR0cDovL2V4YW1wbGUuZWR1L2NyZWRlbnRpYWxzLzM3MzIiLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVW5pdmVyc2l0eURlZ3JlZUNyZWRlbnRpYWwiXSwiaXNzdWVyIjoiaHR0cHM6Ly9leGFtcGxlLmVkdS9pc3N1ZXJzLzU2NTA0OSIsImlzc3VhbmNlRGF0ZSI6IjIwMTAtMDEtMDFUMDA6MDA6MDBaIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiaWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEiLCJkZWdyZWUiOnsidHlwZSI6IkJhY2hlbG9yRGVncmVlIiwibmFtZSI6IkJhY2hlbG9yIG9mIFNjaWVuY2UgYW5kIEFydHMifX19LCJpc3MiOiJodHRwczovL2V4YW1wbGUuZWR1L2lzc3VlcnMvNTY1MDQ5IiwibmJmIjoxMjYyMzA0MDAwLCJqdGkiOiJodHRwOi8vZXhhbXBsZS5lZHUvY3JlZGVudGlhbHMvMzczMiIsInN1YiI6ImRpZDpleGFtcGxlOmViZmViMWY3MTJlYmM2ZjFjMjc2ZTEyZWMyMSJ9.z5vgMTK1nfizNCg5N-niCOL3WUIAL7nXy-nGhDZYO_-PNGeE-0djCpWAMH8fD8eWSID5PfkPBYkx_dfLJnQ7NA'; -const INITIATE_QR_PRE_AUTHORIZED = 'openid-initiate-issuance://?issuer=https%3A%2F%2Fissuer.research.identiproof.io&credential_type=OpenBadgeCredentialUrl&pre-authorized_code=4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp&user_pin_required=true'; -const OFFER_QR_PRE_AUTHORIZED = 'openid-credential-offer://?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D'; -const HTTPS_INITIATE_QR = 'https://issuer.research.identiproof.io?issuer=https%3A%2F%2Fissuer.research.identiproof.io&credential_type=OpenBadgeCredentialUrl&pre-authorized_code=4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp&user_pin_required=true' -const HTTPS_OFFER_QR_AUTHORIZATION_CODE = 'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%22issuer_state%22%3A%22eyJhbGciOiJSU0Et...FYUaBy%22%7D%7D%7D'; -const HTTPS_OFFER_QR_PRE_AUTHORIZED = 'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D' + 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2YyI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL2V4YW1wbGVzL3YxIl0sImlkIjoiaHR0cDovL2V4YW1wbGUuZWR1L2NyZWRlbnRpYWxzLzM3MzIiLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIiwiVW5pdmVyc2l0eURlZ3JlZUNyZWRlbnRpYWwiXSwiaXNzdWVyIjoiaHR0cHM6Ly9leGFtcGxlLmVkdS9pc3N1ZXJzLzU2NTA0OSIsImlzc3VhbmNlRGF0ZSI6IjIwMTAtMDEtMDFUMDA6MDA6MDBaIiwiY3JlZGVudGlhbFN1YmplY3QiOnsiaWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEiLCJkZWdyZWUiOnsidHlwZSI6IkJhY2hlbG9yRGVncmVlIiwibmFtZSI6IkJhY2hlbG9yIG9mIFNjaWVuY2UgYW5kIEFydHMifX19LCJpc3MiOiJodHRwczovL2V4YW1wbGUuZWR1L2lzc3VlcnMvNTY1MDQ5IiwibmJmIjoxMjYyMzA0MDAwLCJqdGkiOiJodHRwOi8vZXhhbXBsZS5lZHUvY3JlZGVudGlhbHMvMzczMiIsInN1YiI6ImRpZDpleGFtcGxlOmViZmViMWY3MTJlYmM2ZjFjMjc2ZTEyZWMyMSJ9.z5vgMTK1nfizNCg5N-niCOL3WUIAL7nXy-nGhDZYO_-PNGeE-0djCpWAMH8fD8eWSID5PfkPBYkx_dfLJnQ7NA' +const INITIATE_QR_PRE_AUTHORIZED = + 'openid-initiate-issuance://?issuer=https%3A%2F%2Fissuer.research.identiproof.io&credential_type=OpenBadgeCredentialUrl&pre-authorized_code=4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp&user_pin_required=true' +const OFFER_QR_PRE_AUTHORIZED = + 'openid-credential-offer://?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D' +const HTTPS_INITIATE_QR = + 'https://issuer.research.identiproof.io?issuer=https%3A%2F%2Fissuer.research.identiproof.io&credential_type=OpenBadgeCredentialUrl&pre-authorized_code=4jLs9xZHEfqcoow0kHE7d1a8hUk6Sy-5bVSV2MqBUGUgiFFQi-ImL62T-FmLIo8hKA1UdMPH0lM1xAgcFkJfxIw9L-lI3mVs0hRT8YVwsEM1ma6N3wzuCdwtMU4bcwKp&user_pin_required=true' +const HTTPS_OFFER_QR_AUTHORIZATION_CODE = + 'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%22issuer_state%22%3A%22eyJhbGciOiJSU0Et...FYUaBy%22%7D%7D%7D' +const HTTPS_OFFER_QR_PRE_AUTHORIZED = + 'https://issuer.research.identiproof.io?credential_offer%3D%7B%22credential_issuer%22%3A%22https%3A%2F%2Fissuer.research.identiproof.io%22%2C%22credentials%22%3A%5B%7B%22format%22%3A%22jwt_vc_json%22%2C%22types%22%3A%5B%22VerifiableCredential%22%2C%22UniversityDegreeCredential%22%5D%7D%5D%2C%22grants%22%3A%7B%22urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Apre-authorized_code%22%3A%7B%22pre-authorized_code%22%3A%22adhjhdjajkdkhjhdj%22%2C%22user_pin_required%22%3Atrue%7D%7D%7D' function succeedWithAFullFlowWithClientSetup() { - nock(IDENTIPROOF_ISSUER_URL).get('/.well-known/openid-credential-issuer').reply(200, JSON.stringify(IDENTIPROOF_OID4VCI_METADATA)); - nock(IDENTIPROOF_AS_URL).get('/.well-known/oauth-authorization-server').reply(200, JSON.stringify(IDENTIPROOF_AS_METADATA)); - nock(IDENTIPROOF_AS_URL).get(WellKnownEndpoints.OPENID_CONFIGURATION).reply(404, {}); + nock(IDENTIPROOF_ISSUER_URL).get('/.well-known/openid-credential-issuer').reply(200, JSON.stringify(IDENTIPROOF_OID4VCI_METADATA)) + nock(IDENTIPROOF_AS_URL).get('/.well-known/oauth-authorization-server').reply(200, JSON.stringify(IDENTIPROOF_AS_METADATA)) + nock(IDENTIPROOF_AS_URL).get(WellKnownEndpoints.OPENID_CONFIGURATION).reply(404, {}) nock(IDENTIPROOF_AS_URL) .post(/oauth2\/token.*/) - .reply(200, JSON.stringify(mockedAccessTokenResponse)); + .reply(200, JSON.stringify(mockedAccessTokenResponse)) nock(IDENTIPROOF_ISSUER_URL) .post(/credential/) .reply(200, { format: 'jwt-vc', credential: mockedVC, - }); + }) } export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Promise; tearDown: () => Promise }): void => { @@ -59,47 +65,57 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro it('should get initialization data using pre-authorized_code and openid-initiate-issuance draft < 9', async (): Promise => { succeedWithAFullFlowWithClientSetup() - await expect(agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: INITIATE_QR_PRE_AUTHORIZED - } - })).resolves.toEqual(GET_INITIATION_DATA_PRE_AUTHORIZED_OPENID_INITIATE_ISSUANCE) + await expect( + agent.oid4vciHolderGetInitiationData({ + requestData: { + uri: INITIATE_QR_PRE_AUTHORIZED, + }, + }), + ).resolves.toEqual(GET_INITIATION_DATA_PRE_AUTHORIZED_OPENID_INITIATE_ISSUANCE) }) it('should get initialization data using pre-authorized_code and draft 11 >', async (): Promise => { succeedWithAFullFlowWithClientSetup() - await expect(agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: OFFER_QR_PRE_AUTHORIZED - } - })).resolves.toEqual(GET_INITIATION_DATA_PRE_AUTHORIZED_OPENID_CREDENTIAL_OFFER) + await expect( + agent.oid4vciHolderGetInitiationData({ + requestData: { + uri: OFFER_QR_PRE_AUTHORIZED, + }, + }), + ).resolves.toEqual(GET_INITIATION_DATA_PRE_AUTHORIZED_OPENID_CREDENTIAL_OFFER) }) it('should get initialization data using pre-authorized_code and https draft < 9', async (): Promise => { succeedWithAFullFlowWithClientSetup() - await expect(agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: HTTPS_INITIATE_QR - } - })).resolves.toEqual(GET_INITIATION_DATA_PRE_AUTHORIZED_HTTPS_INITIATE_FLOW) + await expect( + agent.oid4vciHolderGetInitiationData({ + requestData: { + uri: HTTPS_INITIATE_QR, + }, + }), + ).resolves.toEqual(GET_INITIATION_DATA_PRE_AUTHORIZED_HTTPS_INITIATE_FLOW) }) it('should get initialization data using authorization_code and https draft 11 >', async (): Promise => { succeedWithAFullFlowWithClientSetup() - await expect(agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: HTTPS_OFFER_QR_AUTHORIZATION_CODE - } - })).resolves.toEqual(GET_INITIATION_DATA_AUTHORIZATION_CODE_HTTPS) + await expect( + agent.oid4vciHolderGetInitiationData({ + requestData: { + uri: HTTPS_OFFER_QR_AUTHORIZATION_CODE, + }, + }), + ).resolves.toEqual(GET_INITIATION_DATA_AUTHORIZATION_CODE_HTTPS) }) it('should get initialization data using pre-authorized_code and https draft 11 >', async (): Promise => { succeedWithAFullFlowWithClientSetup() - await expect(agent.oid4vciHolderGetInitiationData({ - requestData: { - uri: HTTPS_OFFER_QR_PRE_AUTHORIZED - } - })).resolves.toEqual(GET_INITIATION_DATA_PRE_AUTHORIZED_CODE_HTTPS) + await expect( + agent.oid4vciHolderGetInitiationData({ + requestData: { + uri: HTTPS_OFFER_QR_PRE_AUTHORIZED, + }, + }), + ).resolves.toEqual(GET_INITIATION_DATA_PRE_AUTHORIZED_CODE_HTTPS) }) }) } diff --git a/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts b/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts index 2c2a2d96c..77df65f2a 100644 --- a/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts +++ b/packages/oid4vci-holder/src/agent/OID4VCIHolder.ts @@ -197,7 +197,11 @@ export class OID4VCIHolder implements IAgentPlugin { if ( !requestData?.uri || - !(requestData?.uri.startsWith(RequestType.OPENID_INITIATE_ISSUANCE) || requestData?.uri.startsWith(RequestType.OPENID_CREDENTIAL_OFFER) || requestData?.uri.startsWith(RequestType.HTTPS)) + !( + requestData?.uri.startsWith(RequestType.OPENID_INITIATE_ISSUANCE) || + requestData?.uri.startsWith(RequestType.OPENID_CREDENTIAL_OFFER) || + requestData?.uri.startsWith(RequestType.HTTPS) + ) ) { return Promise.reject(Error(`Invalid OID4VCI credential offer URI: ${requestData?.uri}`)) } diff --git a/packages/oid4vci-holder/src/link-handler/index.ts b/packages/oid4vci-holder/src/link-handler/index.ts index d560a25b7..61d92f0c2 100644 --- a/packages/oid4vci-holder/src/link-handler/index.ts +++ b/packages/oid4vci-holder/src/link-handler/index.ts @@ -10,7 +10,7 @@ export class OID4VCIHolderLinkHandler extends LinkHandlerAdapter { private readonly stateNavigationListener: | ((oid4vciMachine: OID4VCIMachineInterpreter, state: OID4VCIMachineState, navigation?: any) => Promise) | undefined - private noStateMachinePersistence: boolean; + private noStateMachinePersistence: boolean constructor( args: Pick & { @@ -53,7 +53,7 @@ export class OID4VCIHolderLinkHandler extends LinkHandlerAdapter { cleanupAllOtherInstances: true, cleanupOnFinalState: true, singletonCheck: true, - noRegistration: this.noStateMachinePersistence + noRegistration: this.noStateMachinePersistence, }) } else { interpreter.start() diff --git a/packages/oid4vci-holder/src/types/IOID4VCIHolder.ts b/packages/oid4vci-holder/src/types/IOID4VCIHolder.ts index 4668b4721..6c3c9555a 100644 --- a/packages/oid4vci-holder/src/types/IOID4VCIHolder.ts +++ b/packages/oid4vci-holder/src/types/IOID4VCIHolder.ts @@ -288,7 +288,7 @@ export type ErrorDetails = { export enum RequestType { OPENID_INITIATE_ISSUANCE = 'openid-initiate-issuance', OPENID_CREDENTIAL_OFFER = 'openid-credential-offer', - HTTPS = 'https' + HTTPS = 'https', } export type CredentialTypeSelection = { diff --git a/packages/vc-handler-ld-local/src/__tests__/restAgent.test.ts b/packages/vc-handler-ld-local/src/__tests__/restAgent.test.ts index ff9b7e32b..9a7853718 100644 --- a/packages/vc-handler-ld-local/src/__tests__/restAgent.test.ts +++ b/packages/vc-handler-ld-local/src/__tests__/restAgent.test.ts @@ -23,10 +23,7 @@ let restServer: Server const setup = async (): Promise => { const config = await getConfig('packages/vc-handler-ld-local/agent.yml') ;(config.agent.$args[0].plugins[0].$args[0].contextMaps = [LdDefaultContexts /*, customContext*/]), - (config.agent.$args[0].plugins[0].$args[0].suites = [ - new SphereonEd25519Signature2018(), - new SphereonEd25519Signature2020(), - ]) + (config.agent.$args[0].plugins[0].$args[0].suites = [new SphereonEd25519Signature2018(), new SphereonEd25519Signature2020()]) const { agent } = await createObjects(config, { agent: '/agent' }) serverAgent = agent diff --git a/packages/vc-handler-ld-local/src/__tests__/statuslist.test.ts b/packages/vc-handler-ld-local/src/__tests__/statuslist.test.ts index 8153e37ca..b5c856158 100644 --- a/packages/vc-handler-ld-local/src/__tests__/statuslist.test.ts +++ b/packages/vc-handler-ld-local/src/__tests__/statuslist.test.ts @@ -16,11 +16,7 @@ import { } from '@sphereon/ssi-sdk.vc-status-list' import { CredentialHandlerLDLocal } from '../agent' import { LdDefaultContexts } from '../ld-default-contexts' -import { - SphereonEcdsaSecp256k1RecoverySignature2020, - SphereonEd25519Signature2018, - SphereonEd25519Signature2020 -} from '../suites' +import { SphereonEcdsaSecp256k1RecoverySignature2020, SphereonEd25519Signature2018, SphereonEd25519Signature2020 } from '../suites' import { ICredentialHandlerLDLocal, MethodNames } from '../types' jest.setTimeout(100000)