33 IssuerCredentialSubjectDisplay ,
44 IssuerMetadataV1_0_08 ,
55 IssuerMetadataV1_0_13 ,
6+ PRE_AUTH_GRANT_LITERAL ,
67} from '@sphereon/oid4vci-common' ;
78import { ICredentialStatus , W3CVerifiableCredential } from '@sphereon/ssi-types' ;
89
@@ -76,7 +77,7 @@ const mockData: VciMockDataStructure = {
7677 credential_endpoint : 'https://ngi-oidc4vci-test.spruceid.xyz/credential' ,
7778 token_endpoint : 'https://ngi-oidc4vci-test.spruceid.xyz/token' ,
7879 jwks_uri : 'https://ngi-oidc4vci-test.spruceid.xyz/jwks' ,
79- grant_types_supported : [ 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ] ,
80+ grant_types_supported : [ PRE_AUTH_GRANT_LITERAL ] ,
8081 credentials_supported : {
8182 OpenBadgeCredential : {
8283 formats : {
@@ -100,7 +101,7 @@ const mockData: VciMockDataStructure = {
100101 method : 'POST' ,
101102 request : {
102103 client_id : 'sphereon:ssi-wallet' ,
103- grant_type : 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ,
104+ grant_type : PRE_AUTH_GRANT_LITERAL ,
104105 'pre-authorized_code' :
105106 'eyJhbGciOiJFUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOlsiT3BlbkJhZGdlQ3JlZGVudGlhbCJdLCJleHAiOiIyMDIzLTA0LTE5VDExOjUzOjM4WiIsIm5vbmNlIjoiN3F4YldMcktpNTZjNjRlWjljaHJZeVUxbFVVQzMzV1YifQ.tDxAC8CsqN-DALOmY5ANEVf96fZfTzqHL4Aiq4IZzMJ-zSCrNkNBeuOK5D3RsJhSZcDMu2XvuG1RrSXJV0zHRg' ,
106107 } ,
@@ -141,7 +142,7 @@ const mockData: VciMockDataStructure = {
141142 pushed_authorization_request_endpoint : 'https://jff.walt.id/issuer-api/default/oidc/par' ,
142143 issuer : 'https://jff.walt.id/issuer-api/default' ,
143144 jwks_uri : 'https://jff.walt.id/issuer-api/default/oidc' ,
144- grant_types_supported : [ 'authorization_code' , 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ] ,
145+ grant_types_supported : [ 'authorization_code' , PRE_AUTH_GRANT_LITERAL ] ,
145146 request_uri_parameter_supported : true ,
146147 credentials_supported : {
147148 VerifiableId : {
@@ -343,7 +344,7 @@ const mockData: VciMockDataStructure = {
343344 method : 'POST' ,
344345 request : {
345346 client_id : 'sphereon:ssi-wallet' ,
346- grant_type : 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ,
347+ grant_type : PRE_AUTH_GRANT_LITERAL ,
347348 'pre-authorized_code' :
348349 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1NzhkZWZjOS0wMTFlLTQ3ZTAtYmQ5YS03MWFlOGU4ZTJjYzYiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.uh1rX4qVqlp-YW-itLON8Zmov8t-xugCFDXlUSPuTSQ' ,
349350 } ,
@@ -450,7 +451,7 @@ const mockData: VciMockDataStructure = {
450451 ] ,
451452 } ,
452453 code_challenge_methods_supported : [ 'plain' , 'S256' ] ,
453- grant_types_supported : [ 'authorization_code' , 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ] ,
454+ grant_types_supported : [ 'authorization_code' , PRE_AUTH_GRANT_LITERAL ] ,
454455 token_endpoint_auth_methods_supported : [ 'client_secret_post' , 'client_secret_basic' ] ,
455456 issuer : 'https: //oidc4vc.uniissuer.io/' ,
456457 authorization_endpoint : 'https://oidc4vc.uniissuer.io/1.0/authorize' ,
@@ -463,7 +464,7 @@ const mockData: VciMockDataStructure = {
463464 method : 'POST' ,
464465 request : {
465466 client_id : 'sphereon:ssi-wallet' ,
466- grant_type : 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ,
467+ grant_type : PRE_AUTH_GRANT_LITERAL ,
467468 'pre-authorized_code' : 'rQhxqvmEQef2pFChuedmDWlp6iIifUVI' ,
468469 } ,
469470 response : {
@@ -505,7 +506,7 @@ const mockData: VciMockDataStructure = {
505506 jwks_uri : 'https://launchpad.vii.electron.mattrlabs.io/oidc/v1/auth/jwks' ,
506507 token_endpoint_auth_methods_supported : [ 'none' , 'client_secret_basic' , 'client_secret_jwt' , 'client_secret_post' , 'private_key_jwt' ] ,
507508 code_challenge_methods_supported : [ 'S256' ] ,
508- grant_types_supported : [ 'authorization_code' , 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ] ,
509+ grant_types_supported : [ 'authorization_code' , PRE_AUTH_GRANT_LITERAL ] ,
509510 response_modes_supported : [ 'form_post' , 'fragment' , 'query' ] ,
510511 response_types_supported : [ 'code id_token' , 'code' , 'id_token' , 'none' ] ,
511512 scopes_supported : [ 'PermanentResidentCard' , 'AcademicAward' , 'LearnerProfile' , 'OpenBadgeCredential' ] ,
@@ -564,7 +565,7 @@ const mockData: VciMockDataStructure = {
564565 method : 'POST' ,
565566 request : {
566567 client_id : 'sphereon:ssi-wallet' ,
567- grant_type : 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ,
568+ grant_type : PRE_AUTH_GRANT_LITERAL ,
568569 'pre-authorized_code' : 'kI_19c0PtisCJBG-ngd9mA47UCKx4uoKglUp0gqmxKt' ,
569570 } ,
570571 response : {
@@ -658,7 +659,7 @@ const mockData: VciMockDataStructure = {
658659 credential_endpoint : 'https://oidc4vc.diwala.io/credential' ,
659660 token_endpoint : 'https://oidc4vc.diwala.io/token' ,
660661 jwks_uri : 'https://oidc4vc.diwala.io/jwks' ,
661- grant_types_supported : [ 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ] ,
662+ grant_types_supported : [ PRE_AUTH_GRANT_LITERAL ] ,
662663 credentials_supported : {
663664 OpenBadgeCredential : {
664665 formats : {
@@ -677,7 +678,7 @@ const mockData: VciMockDataStructure = {
677678 method : 'POST' ,
678679 request : {
679680 client_id : 'sphereon:ssi-wallet' ,
680- grant_type : 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ,
681+ grant_type : PRE_AUTH_GRANT_LITERAL ,
681682 'pre-authorized_code' :
682683 'eyJhbGciOiJIUzI1NiJ9.eyJjcmVkZW50aWFsX3R5cGUiOiJPcGVuQmFkZ2VDcmVkZW50aWFsIiwiZXhwIjoxNjgxOTE1NzI5fQ.JmhU1jhMfw3f_DaIqnxurPyIW1makcwUs49Fm253z5Q' ,
683684 } ,
@@ -1408,7 +1409,7 @@ const mockData: VciMockDataStructure = {
14081409 name : 'Chamber of Commerce' ,
14091410 } ,
14101411 ] ,
1411- grant_types_supported : [ 'authorization_code' , 'urn:ietf:params:oauth:grant-type:pre-authorized_code' ] ,
1412+ grant_types_supported : [ 'authorization_code' , PRE_AUTH_GRANT_LITERAL ] ,
14121413 id_token_signing_alg_values_supported : [ 'ES256' ] ,
14131414 issuer : 'https://mijnkvk.acc.credenco.com' ,
14141415 jwks_uri : 'https://mijnkvk.acc.credenco.com/jwks' ,
0 commit comments