@sphereon/oid4vci-common 0.16.1-next.181 → 0.16.1-next.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/ServerMetadata.d.ts +19 -9
- package/dist/types/ServerMetadata.d.ts.map +1 -1
- package/dist/types/ServerMetadata.js +27 -1
- package/dist/types/ServerMetadata.js.map +1 -1
- package/dist/types/v1_0_13.types.d.ts +1 -2
- package/dist/types/v1_0_13.types.d.ts.map +1 -1
- package/dist/types/v1_0_13.types.js +20 -0
- package/dist/types/v1_0_13.types.js.map +1 -1
- package/lib/types/ServerMetadata.ts +118 -10
- package/lib/types/v1_0_13.types.ts +23 -2
- package/package.json +3 -3
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import { DynamicRegistrationClientMetadata, SigningAlgo } from '@sphereon/oid4vc-common';
|
|
2
|
+
export type OAuthResponseType = 'code' | 'token' | 'id_token' | 'code token' | 'code id_token' | 'token id_token' | 'code token id_token';
|
|
3
|
+
export type TokenEndpointAuthMethod = 'client_secret_basic' | 'client_secret_post' | 'client_secret_jwt' | 'private_key_jwt' | 'none';
|
|
4
|
+
export type TokenEndpointAuthSigningAlg = 'RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512' | 'HS256' | 'HS384' | 'HS512';
|
|
5
|
+
export type OAuthScope = 'openid' | 'profile' | 'email' | 'address' | 'phone' | 'offline_access';
|
|
6
|
+
export type OAuthResponseMode = 'query' | 'fragment' | 'form_post';
|
|
7
|
+
export type OAuthGrantType = 'authorization_code' | 'implicit' | 'password' | 'client_credentials' | 'refresh_token' | 'urn:ietf:params:oauth:grant-type:device_code' | 'urn:ietf:params:oauth:grant-type:saml2-bearer' | 'urn:ietf:params:oauth:grant-type:jwt-bearer';
|
|
8
|
+
export type RevocationEndpointAuthMethod = 'client_secret_basic' | 'client_secret_post' | 'client_secret_jwt' | 'private_key_jwt' | 'none';
|
|
9
|
+
export type RevocationEndpointAuthSigningAlg = 'RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512' | 'HS256' | 'HS384' | 'HS512';
|
|
10
|
+
export type PKCECodeChallengeMethod = 'plain' | 'S256';
|
|
2
11
|
export interface AuthorizationServerMetadata extends DynamicRegistrationClientMetadata {
|
|
3
12
|
issuer: string;
|
|
4
13
|
authorization_endpoint?: string;
|
|
5
14
|
token_endpoint?: string;
|
|
6
|
-
token_endpoint_auth_methods_supported?:
|
|
7
|
-
token_endpoint_auth_signing_alg_values_supported?:
|
|
15
|
+
token_endpoint_auth_methods_supported?: Array<TokenEndpointAuthMethod>;
|
|
16
|
+
token_endpoint_auth_signing_alg_values_supported?: Array<TokenEndpointAuthSigningAlg>;
|
|
8
17
|
registration_endpoint?: string;
|
|
9
|
-
scopes_supported?: string
|
|
10
|
-
response_types_supported:
|
|
11
|
-
response_modes_supported?:
|
|
12
|
-
grant_types_supported?:
|
|
18
|
+
scopes_supported?: Array<OAuthScope | string>;
|
|
19
|
+
response_types_supported: Array<OAuthResponseType>;
|
|
20
|
+
response_modes_supported?: Array<OAuthResponseMode>;
|
|
21
|
+
grant_types_supported?: Array<OAuthGrantType>;
|
|
13
22
|
service_documentation?: string;
|
|
14
23
|
ui_locales_supported?: string[];
|
|
15
24
|
op_policy_uri?: string;
|
|
16
25
|
op_tos_uri?: string;
|
|
17
26
|
revocation_endpoint?: string;
|
|
18
|
-
revocation_endpoint_auth_methods_supported?:
|
|
19
|
-
revocation_endpoint_auth_signing_alg_values_supported?:
|
|
27
|
+
revocation_endpoint_auth_methods_supported?: Array<RevocationEndpointAuthMethod>;
|
|
28
|
+
revocation_endpoint_auth_signing_alg_values_supported?: Array<RevocationEndpointAuthSigningAlg>;
|
|
20
29
|
introspection_endpoint?: string;
|
|
21
|
-
code_challenge_methods_supported?:
|
|
30
|
+
code_challenge_methods_supported?: Array<PKCECodeChallengeMethod>;
|
|
22
31
|
pushed_authorization_request_endpoint?: string;
|
|
23
32
|
require_pushed_authorization_requests?: boolean;
|
|
24
33
|
'pre-authorized_grant_anonymous_access_supported': boolean;
|
|
@@ -41,6 +50,7 @@ export interface AuthorizationServerMetadata extends DynamicRegistrationClientMe
|
|
|
41
50
|
deferred_credential_endpoint?: string;
|
|
42
51
|
[x: string]: any;
|
|
43
52
|
}
|
|
53
|
+
export declare const authorizationServerMetadataFieldNames: Array<keyof AuthorizationServerMetadata>;
|
|
44
54
|
export declare enum WellKnownEndpoints {
|
|
45
55
|
OPENID_CONFIGURATION = "/.well-known/openid-configuration",
|
|
46
56
|
OAUTH_AS = "/.well-known/oauth-authorization-server",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerMetadata.d.ts","sourceRoot":"","sources":["../../lib/types/ServerMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ServerMetadata.d.ts","sourceRoot":"","sources":["../../lib/types/ServerMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAExF,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,OAAO,GACP,UAAU,GACV,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,qBAAqB,CAAC;AAG1B,MAAM,MAAM,uBAAuB,GAC/B,qBAAqB,GACrB,oBAAoB,GACpB,mBAAmB,GACnB,iBAAiB,GACjB,MAAM,CAAC;AAEX,MAAM,MAAM,2BAA2B,GACnC,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,CAAC;AAEZ,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,OAAO,GACP,gBAAg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AA;AAEV,oBAAY,kBAAkB;IAC5B,oBAAoB,sCAAsC;IAC1D,QAAQ,4CAA4C;IACpD,iBAAiB,0CAA0C;CAC5D;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC"}
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WellKnownEndpoints = void 0;
|
|
3
|
+
exports.WellKnownEndpoints = exports.authorizationServerMetadataFieldNames = void 0;
|
|
4
|
+
// These can be used be a reducer
|
|
5
|
+
exports.authorizationServerMetadataFieldNames = [
|
|
6
|
+
'issuer',
|
|
7
|
+
'authorization_endpoint',
|
|
8
|
+
'token_endpoint',
|
|
9
|
+
'jwks_uri',
|
|
10
|
+
'registration_endpoint',
|
|
11
|
+
'scopes_supported',
|
|
12
|
+
'response_types_supported',
|
|
13
|
+
'response_modes_supported',
|
|
14
|
+
'grant_types_supported',
|
|
15
|
+
'token_endpoint_auth_methods_supported',
|
|
16
|
+
'token_endpoint_auth_signing_alg_values_supported',
|
|
17
|
+
'service_documentation',
|
|
18
|
+
'ui_locales_supported',
|
|
19
|
+
'op_policy_uri',
|
|
20
|
+
'op_tos_uri',
|
|
21
|
+
'revocation_endpoint',
|
|
22
|
+
'revocation_endpoint_auth_methods_supported',
|
|
23
|
+
'revocation_endpoint_auth_signing_alg_values_supported',
|
|
24
|
+
'introspection_endpoint',
|
|
25
|
+
'introspection_endpoint_auth_methods_supported',
|
|
26
|
+
'introspection_endpoint_auth_signing_alg_values_supported',
|
|
27
|
+
'code_challenge_methods_supported',
|
|
28
|
+
'signed_metadata'
|
|
29
|
+
];
|
|
4
30
|
var WellKnownEndpoints;
|
|
5
31
|
(function (WellKnownEndpoints) {
|
|
6
32
|
WellKnownEndpoints["OPENID_CONFIGURATION"] = "/.well-known/openid-configuration";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerMetadata.js","sourceRoot":"","sources":["../../lib/types/ServerMetadata.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ServerMetadata.js","sourceRoot":"","sources":["../../lib/types/ServerMetadata.ts"],"names":[],"mappings":";;;AAyIA,iCAAiC;AACpB,QAAA,qCAAqC,GAA6C;IAC7F,QAAQ;IACR,wBAAwB;IACxB,gBAAgB;IAChB,UAAU;IACV,uBAAuB;IACvB,kBAAkB;IAClB,0BAA0B;IAC1B,0BAA0B;IAC1B,uBAAuB;IACvB,uCAAuC;IACvC,kDAAkD;IAClD,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,YAAY;IACZ,qBAAqB;IACrB,4CAA4C;IAC5C,uDAAuD;IACvD,wBAAwB;IACxB,+CAA+C;IAC/C,0DAA0D;IAC1D,kCAAkC;IAClC,iBAAiB;CACT,CAAA;AAEV,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,gFAA0D,CAAA;IAC1D,0EAAoD,CAAA;IACpD,iFAA2D,CAAA;AAC7D,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
|
|
@@ -5,12 +5,10 @@ import { AlgValue, CommonCredentialRequest, CredentialDataSupplierInput, Credent
|
|
|
5
5
|
import { QRCodeOpts } from './QRCode.types';
|
|
6
6
|
import { AuthorizationServerMetadata, AuthorizationServerType, EndpointMetadata } from './ServerMetadata';
|
|
7
7
|
export interface IssuerMetadataV1_0_13 {
|
|
8
|
-
issuer?: string;
|
|
9
8
|
credential_configurations_supported: Record<string, CredentialConfigurationSupportedV1_0_13>;
|
|
10
9
|
credential_issuer: string;
|
|
11
10
|
credential_endpoint: string;
|
|
12
11
|
authorization_servers?: string[];
|
|
13
|
-
batch_credential_endpoint?: string;
|
|
14
12
|
deferred_credential_endpoint?: string;
|
|
15
13
|
notification_endpoint?: string;
|
|
16
14
|
credential_response_encryption?: ResponseEncryption;
|
|
@@ -140,6 +138,7 @@ export interface CredentialIssuerMetadataOptsV1_0_13 {
|
|
|
140
138
|
token_endpoint?: string;
|
|
141
139
|
credential_supplier_config?: CredentialSupplierConfig;
|
|
142
140
|
}
|
|
141
|
+
export declare const credentialIssuerMetadataFieldNames: Array<keyof CredentialIssuerMetadataOptsV1_0_13>;
|
|
143
142
|
export interface EndpointMetadataResultV1_0_13 extends EndpointMetadata {
|
|
144
143
|
authorizationServerType: AuthorizationServerType;
|
|
145
144
|
authorizationServerMetadata?: AuthorizationServerMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1_0_13.types.d.ts","sourceRoot":"","sources":["../../lib/types/v1_0_13.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAE9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EACL,QAAQ,EACR,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,QAAQ,EACR,KAAK,EACL,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE1G,MAAM,WAAW,qBAAqB;IACpC,
|
|
1
|
+
{"version":3,"file":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,EAAE,OAAO,CAAC,2BAA2B,CAAC;IAChI,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mCAAmC,EAAE,MAAM,CAAC,MAAM,EAAE,uCAAuC,CAAC,CAAC;IAC7F,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mDAAmD,CAAC,EAAE,MAAM,CAAC;IAC7D,mDAAmD,CAAC,EAAE,MAAM,CAAC;IAC7D,sCAAsC,CAAC,EAAE,OAAO,CAAC;IACjD,gCAAgC,CAAC,EAAE,OAAO,CAAC;CAC5C"}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.credentialIssuerMetadataFieldNames = void 0;
|
|
4
|
+
// These can be used be a reducer
|
|
5
|
+
exports.credentialIssuerMetadataFieldNames = [
|
|
6
|
+
// Required fields
|
|
7
|
+
'credential_issuer',
|
|
8
|
+
'credential_configurations_supported',
|
|
9
|
+
'credential_endpoint',
|
|
10
|
+
// Optional fields from CredentialIssuerMetadataOpts
|
|
11
|
+
'batch_credential_endpoint',
|
|
12
|
+
'deferred_credential_endpoint',
|
|
13
|
+
'notification_endpoint',
|
|
14
|
+
'credential_response_encryption',
|
|
15
|
+
'authorization_servers',
|
|
16
|
+
'token_endpoint',
|
|
17
|
+
'display',
|
|
18
|
+
'credential_supplier_config',
|
|
19
|
+
// Optional fields from v1.0.13
|
|
20
|
+
'credential_identifiers_supported',
|
|
21
|
+
'signed_metadata'
|
|
22
|
+
];
|
|
3
23
|
//# sourceMappingURL=v1_0_13.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1_0_13.types.js","sourceRoot":"","sources":["../../lib/types/v1_0_13.types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"v1_0_13.types.js","sourceRoot":"","sources":["../../lib/types/v1_0_13.types.ts"],"names":[],"mappings":";;;AAiNA,iCAAiC;AACpB,QAAA,kCAAkC,GAAqD;IAClG,kBAAkB;IAClB,mBAAmB;IACnB,qCAAqC;IACrC,qBAAqB;IAErB,oDAAoD;IACpD,2BAA2B;IAC3B,8BAA8B;IAC9B,uBAAuB;IACvB,gCAAgC;IAChC,uBAAuB;IACvB,gBAAgB;IAChB,SAAS;IACT,4BAA4B;IAE5B,+BAA+B;IAC/B,kCAAkC;IAClC,iBAAiB;CACT,CAAA"}
|
|
@@ -1,29 +1,110 @@
|
|
|
1
|
-
import { DynamicRegistrationClientMetadata, SigningAlgo } from '@sphereon/oid4vc-common'
|
|
1
|
+
import { DynamicRegistrationClientMetadata, SigningAlgo } from '@sphereon/oid4vc-common'
|
|
2
|
+
|
|
3
|
+
export type OAuthResponseType =
|
|
4
|
+
| 'code'
|
|
5
|
+
| 'token'
|
|
6
|
+
| 'id_token'
|
|
7
|
+
| 'code token'
|
|
8
|
+
| 'code id_token'
|
|
9
|
+
| 'token id_token'
|
|
10
|
+
| 'code token id_token';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export type TokenEndpointAuthMethod =
|
|
14
|
+
| 'client_secret_basic'
|
|
15
|
+
| 'client_secret_post'
|
|
16
|
+
| 'client_secret_jwt'
|
|
17
|
+
| 'private_key_jwt'
|
|
18
|
+
| 'none';
|
|
19
|
+
|
|
20
|
+
export type TokenEndpointAuthSigningAlg =
|
|
21
|
+
| 'RS256'
|
|
22
|
+
| 'RS384'
|
|
23
|
+
| 'RS512'
|
|
24
|
+
| 'ES256'
|
|
25
|
+
| 'ES384'
|
|
26
|
+
| 'ES512'
|
|
27
|
+
| 'PS256'
|
|
28
|
+
| 'PS384'
|
|
29
|
+
| 'PS512'
|
|
30
|
+
| 'HS256'
|
|
31
|
+
| 'HS384'
|
|
32
|
+
| 'HS512';
|
|
33
|
+
|
|
34
|
+
export type OAuthScope =
|
|
35
|
+
| 'openid'
|
|
36
|
+
| 'profile'
|
|
37
|
+
| 'email'
|
|
38
|
+
| 'address'
|
|
39
|
+
| 'phone'
|
|
40
|
+
| 'offline_access'
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
export type OAuthResponseMode =
|
|
44
|
+
| 'query'
|
|
45
|
+
| 'fragment'
|
|
46
|
+
| 'form_post';
|
|
47
|
+
|
|
48
|
+
export type OAuthGrantType =
|
|
49
|
+
| 'authorization_code'
|
|
50
|
+
| 'implicit'
|
|
51
|
+
| 'password'
|
|
52
|
+
| 'client_credentials'
|
|
53
|
+
| 'refresh_token'
|
|
54
|
+
| 'urn:ietf:params:oauth:grant-type:device_code'
|
|
55
|
+
| 'urn:ietf:params:oauth:grant-type:saml2-bearer'
|
|
56
|
+
| 'urn:ietf:params:oauth:grant-type:jwt-bearer'
|
|
57
|
+
|
|
58
|
+
export type RevocationEndpointAuthMethod =
|
|
59
|
+
| 'client_secret_basic'
|
|
60
|
+
| 'client_secret_post'
|
|
61
|
+
| 'client_secret_jwt'
|
|
62
|
+
| 'private_key_jwt'
|
|
63
|
+
| 'none'
|
|
64
|
+
|
|
65
|
+
export type RevocationEndpointAuthSigningAlg =
|
|
66
|
+
| 'RS256'
|
|
67
|
+
| 'RS384'
|
|
68
|
+
| 'RS512'
|
|
69
|
+
| 'ES256'
|
|
70
|
+
| 'ES384'
|
|
71
|
+
| 'ES512'
|
|
72
|
+
| 'PS256'
|
|
73
|
+
| 'PS384'
|
|
74
|
+
| 'PS512'
|
|
75
|
+
| 'HS256'
|
|
76
|
+
| 'HS384'
|
|
77
|
+
| 'HS512'
|
|
78
|
+
|
|
79
|
+
export type PKCECodeChallengeMethod =
|
|
80
|
+
| 'plain'
|
|
81
|
+
| 'S256';
|
|
2
82
|
|
|
3
83
|
export interface AuthorizationServerMetadata extends DynamicRegistrationClientMetadata {
|
|
4
84
|
issuer: string;
|
|
5
85
|
authorization_endpoint?: string;
|
|
6
86
|
token_endpoint?: string;
|
|
7
|
-
token_endpoint_auth_methods_supported?:
|
|
8
|
-
token_endpoint_auth_signing_alg_values_supported?:
|
|
87
|
+
token_endpoint_auth_methods_supported?: Array<TokenEndpointAuthMethod>;
|
|
88
|
+
token_endpoint_auth_signing_alg_values_supported?: Array<TokenEndpointAuthSigningAlg>;
|
|
9
89
|
|
|
10
90
|
registration_endpoint?: string;
|
|
11
|
-
scopes_supported?: string
|
|
12
|
-
response_types_supported:
|
|
13
|
-
response_modes_supported?:
|
|
14
|
-
grant_types_supported?:
|
|
91
|
+
scopes_supported?: Array<OAuthScope | string>;
|
|
92
|
+
response_types_supported: Array<OAuthResponseType>
|
|
93
|
+
response_modes_supported?: Array<OAuthResponseMode>;
|
|
94
|
+
grant_types_supported?: Array<OAuthGrantType>;
|
|
15
95
|
service_documentation?: string;
|
|
16
96
|
ui_locales_supported?: string[];
|
|
17
97
|
op_policy_uri?: string;
|
|
18
98
|
op_tos_uri?: string;
|
|
19
99
|
|
|
20
100
|
revocation_endpoint?: string;
|
|
21
|
-
revocation_endpoint_auth_methods_supported?:
|
|
22
|
-
revocation_endpoint_auth_signing_alg_values_supported?:
|
|
101
|
+
revocation_endpoint_auth_methods_supported?: Array<RevocationEndpointAuthMethod>;
|
|
102
|
+
revocation_endpoint_auth_signing_alg_values_supported?: Array<RevocationEndpointAuthSigningAlg>;
|
|
23
103
|
|
|
24
104
|
introspection_endpoint?: string;
|
|
25
|
-
code_challenge_methods_supported?:
|
|
105
|
+
code_challenge_methods_supported?: Array<PKCECodeChallengeMethod>;
|
|
26
106
|
|
|
107
|
+
// TODO below fields are not in the rfc8414 spec, do we need them?
|
|
27
108
|
pushed_authorization_request_endpoint?: string; // The URL of the pushed authorization request endpoint at which a client can post an authorization request to exchange for a request_uri value usable at the authorization server
|
|
28
109
|
// Note that the presence of pushed_authorization_request_endpoint is sufficient for a client to determine that it may use the PAR flow. A request_uri value obtained from the PAR endpoint is usable at the authorization endpoint regardless of other authorization server metadata such as request_uri_parameter_supported or require_request_uri_registration
|
|
29
110
|
require_pushed_authorization_requests?: boolean; // Boolean parameter indicating whether Indicates whether the client is required to use PAR to initiate authorization. If omitted, the default value is false.
|
|
@@ -54,6 +135,33 @@ export interface AuthorizationServerMetadata extends DynamicRegistrationClientMe
|
|
|
54
135
|
[x: string]: any; //We use any, so you can access properties if you know the structure
|
|
55
136
|
}
|
|
56
137
|
|
|
138
|
+
// These can be used be a reducer
|
|
139
|
+
export const authorizationServerMetadataFieldNames: Array<keyof AuthorizationServerMetadata> = [
|
|
140
|
+
'issuer',
|
|
141
|
+
'authorization_endpoint',
|
|
142
|
+
'token_endpoint',
|
|
143
|
+
'jwks_uri',
|
|
144
|
+
'registration_endpoint',
|
|
145
|
+
'scopes_supported',
|
|
146
|
+
'response_types_supported',
|
|
147
|
+
'response_modes_supported',
|
|
148
|
+
'grant_types_supported',
|
|
149
|
+
'token_endpoint_auth_methods_supported',
|
|
150
|
+
'token_endpoint_auth_signing_alg_values_supported',
|
|
151
|
+
'service_documentation',
|
|
152
|
+
'ui_locales_supported',
|
|
153
|
+
'op_policy_uri',
|
|
154
|
+
'op_tos_uri',
|
|
155
|
+
'revocation_endpoint',
|
|
156
|
+
'revocation_endpoint_auth_methods_supported',
|
|
157
|
+
'revocation_endpoint_auth_signing_alg_values_supported',
|
|
158
|
+
'introspection_endpoint',
|
|
159
|
+
'introspection_endpoint_auth_methods_supported',
|
|
160
|
+
'introspection_endpoint_auth_signing_alg_values_supported',
|
|
161
|
+
'code_challenge_methods_supported',
|
|
162
|
+
'signed_metadata'
|
|
163
|
+
] as const
|
|
164
|
+
|
|
57
165
|
export enum WellKnownEndpoints {
|
|
58
166
|
OPENID_CONFIGURATION = '/.well-known/openid-configuration',
|
|
59
167
|
OAUTH_AS = '/.well-known/oauth-authorization-server',
|
|
@@ -23,12 +23,10 @@ import { QRCodeOpts } from './QRCode.types';
|
|
|
23
23
|
import { AuthorizationServerMetadata, AuthorizationServerType, EndpointMetadata } from './ServerMetadata';
|
|
24
24
|
|
|
25
25
|
export interface IssuerMetadataV1_0_13 {
|
|
26
|
-
issuer?: string;
|
|
27
26
|
credential_configurations_supported: Record<string, CredentialConfigurationSupportedV1_0_13>; // REQUIRED. A JSON object containing a list of key value pairs, where the key is a string serving as an abstract identifier of the Credential. This identifier is RECOMMENDED to be collision resistant - it can be globally unique, but does not have to be when naming conflicts are unlikely to arise in a given use case. The value is a JSON object. The JSON object MUST conform to the structure of the Section 11.2.1.
|
|
28
27
|
credential_issuer: string; // A Credential Issuer is identified by a case sensitive URL using the https scheme that contains scheme, host and, optionally, port number and path components, but no query or fragment components.
|
|
29
28
|
credential_endpoint: string; // REQUIRED. URL of the OP's Credential Endpoint. This URL MUST use the https scheme and MAY contain port, path and query parameter components.
|
|
30
29
|
authorization_servers?: string[];
|
|
31
|
-
batch_credential_endpoint?: string;
|
|
32
30
|
deferred_credential_endpoint?: string;
|
|
33
31
|
notification_endpoint?: string;
|
|
34
32
|
credential_response_encryption?: ResponseEncryption;
|
|
@@ -209,6 +207,29 @@ export interface CredentialIssuerMetadataOptsV1_0_13 {
|
|
|
209
207
|
credential_supplier_config?: CredentialSupplierConfig;
|
|
210
208
|
}
|
|
211
209
|
|
|
210
|
+
// These can be used be a reducer
|
|
211
|
+
export const credentialIssuerMetadataFieldNames: Array<keyof CredentialIssuerMetadataOptsV1_0_13> = [
|
|
212
|
+
// Required fields
|
|
213
|
+
'credential_issuer',
|
|
214
|
+
'credential_configurations_supported',
|
|
215
|
+
'credential_endpoint',
|
|
216
|
+
|
|
217
|
+
// Optional fields from CredentialIssuerMetadataOpts
|
|
218
|
+
'batch_credential_endpoint',
|
|
219
|
+
'deferred_credential_endpoint',
|
|
220
|
+
'notification_endpoint',
|
|
221
|
+
'credential_response_encryption',
|
|
222
|
+
'authorization_servers',
|
|
223
|
+
'token_endpoint',
|
|
224
|
+
'display',
|
|
225
|
+
'credential_supplier_config',
|
|
226
|
+
|
|
227
|
+
// Optional fields from v1.0.13
|
|
228
|
+
'credential_identifiers_supported',
|
|
229
|
+
'signed_metadata'
|
|
230
|
+
] as const
|
|
231
|
+
|
|
232
|
+
|
|
212
233
|
export interface EndpointMetadataResultV1_0_13 extends EndpointMetadata {
|
|
213
234
|
// The EndpointMetadata are snake-case so they can easily be used in payloads/JSON.
|
|
214
235
|
// The values below should not end up in requests/responses directly, so they are using our normal CamelCase convention
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/oid4vci-common",
|
|
3
|
-
"version": "0.16.1-next.
|
|
3
|
+
"version": "0.16.1-next.187+5e12677",
|
|
4
4
|
"description": "OpenID 4 Verifiable Credential Issuance Common Types",
|
|
5
5
|
"source": "lib/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build:clean": "tsc --build --clean && tsc --build"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sphereon/oid4vc-common": "0.16.1-next.
|
|
13
|
+
"@sphereon/oid4vc-common": "0.16.1-next.187+5e12677",
|
|
14
14
|
"@sphereon/ssi-types": "0.30.1",
|
|
15
15
|
"cross-fetch": "^3.1.8",
|
|
16
16
|
"debug": "^4.3.5",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "5e1267796c866153a11e93a90611a34dcbf2b51b"
|
|
56
56
|
}
|