@connectid-tools/rp-nodejs-sdk 4.2.1 → 5.0.1

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.
Files changed (56) hide show
  1. package/README.md +64 -71
  2. package/config.js +2 -31
  3. package/conformance/api/conformance-api.d.ts +38 -0
  4. package/conformance/api/conformance-api.js +53 -0
  5. package/conformance/conformance-config.d.ts +2 -0
  6. package/conformance/conformance-config.js +34 -0
  7. package/crypto/crypto-loader.d.ts +32 -0
  8. package/crypto/crypto-loader.js +49 -0
  9. package/crypto/jwt-helper.d.ts +61 -0
  10. package/crypto/jwt-helper.js +92 -0
  11. package/crypto/pkce-helper.d.ts +43 -0
  12. package/crypto/pkce-helper.js +75 -0
  13. package/endpoints/participants-endpoint.d.ts +55 -0
  14. package/endpoints/participants-endpoint.js +137 -0
  15. package/endpoints/pushed-authorisation-request-endpoint.d.ts +87 -0
  16. package/endpoints/pushed-authorisation-request-endpoint.js +192 -0
  17. package/endpoints/retrieve-token-endpoint.d.ts +66 -0
  18. package/endpoints/retrieve-token-endpoint.js +159 -0
  19. package/endpoints/userinfo-endpoint.d.ts +24 -0
  20. package/endpoints/userinfo-endpoint.js +50 -0
  21. package/fapi/fapi-utils.d.ts +6 -0
  22. package/fapi/fapi-utils.js +9 -0
  23. package/http/http-client-extensions.d.ts +60 -0
  24. package/http/http-client-extensions.js +106 -0
  25. package/http/http-client-factory.d.ts +27 -0
  26. package/http/http-client-factory.js +45 -0
  27. package/model/callback-params.d.ts +31 -0
  28. package/model/callback-params.js +1 -0
  29. package/model/claims.d.ts +100 -0
  30. package/model/claims.js +1 -0
  31. package/model/consolidated-token-set.d.ts +74 -0
  32. package/model/consolidated-token-set.js +100 -0
  33. package/model/discovery-service.d.ts +46 -0
  34. package/model/discovery-service.js +112 -0
  35. package/model/issuer-metadata.d.ts +165 -0
  36. package/model/issuer-metadata.js +1 -0
  37. package/model/jwks.d.ts +12 -0
  38. package/model/jwks.js +1 -0
  39. package/model/token-response.d.ts +31 -0
  40. package/model/token-response.js +1 -0
  41. package/model/token-set.d.ts +73 -0
  42. package/model/token-set.js +179 -0
  43. package/package.json +4 -5
  44. package/relying-party-client-sdk.d.ts +55 -24
  45. package/relying-party-client-sdk.js +90 -304
  46. package/test-data/large-participants-test-data.d.ts +865 -0
  47. package/test-data/large-participants-test-data.js +18907 -0
  48. package/test-data/participants-test-data.d.ts +149 -0
  49. package/test-data/participants-test-data.js +458 -0
  50. package/test-data/sandbox-participants-test-data.d.ts +865 -0
  51. package/test-data/sandbox-participants-test-data.js +3794 -0
  52. package/types.d.ts +61 -32
  53. package/utils/request-utils.d.ts +1 -1
  54. package/utils/request-utils.js +5 -5
  55. package/utils/user-agent.d.ts +1 -1
  56. package/utils/user-agent.js +1 -1
@@ -0,0 +1,100 @@
1
+ import { JWTPayload } from 'jose';
2
+ /**
3
+ * Address Claim as defined in OIDC Core spec.
4
+ */
5
+ export interface AddressClaim {
6
+ formatted?: string;
7
+ street_address?: string;
8
+ locality?: string;
9
+ region?: string;
10
+ postal_code?: string;
11
+ country?: string;
12
+ }
13
+ /**
14
+ * Verified Claims structure for extended claims (ConnectID).
15
+ */
16
+ export interface VerifiedClaims {
17
+ verification?: {
18
+ trust_framework?: {
19
+ value?: string;
20
+ };
21
+ time?: string;
22
+ verification_process?: string;
23
+ evidence?: unknown[];
24
+ };
25
+ claims?: {
26
+ [key: string]: unknown;
27
+ over16?: boolean;
28
+ over18?: boolean;
29
+ over21?: boolean;
30
+ over25?: boolean;
31
+ over65?: boolean;
32
+ beneficiary_account_au?: unknown;
33
+ beneficiary_account_au_payid?: unknown;
34
+ beneficiary_account_international?: unknown;
35
+ cba_loyalty?: unknown;
36
+ };
37
+ }
38
+ /**
39
+ * ID Token Claims
40
+ *
41
+ * Extends the standard JWT payload with OIDC-specific claims.
42
+ * Includes both standard OIDC claims and ConnectID extensions.
43
+ */
44
+ export interface IdTokenClaims extends JWTPayload {
45
+ /**
46
+ * Subject identifier (unique user ID).
47
+ */
48
+ sub: string;
49
+ name?: string;
50
+ given_name?: string;
51
+ middle_name?: string;
52
+ family_name?: string;
53
+ nickname?: string;
54
+ preferred_username?: string;
55
+ profile?: string;
56
+ picture?: string;
57
+ website?: string;
58
+ email?: string;
59
+ email_verified?: boolean;
60
+ gender?: string;
61
+ birthdate?: string;
62
+ zoneinfo?: string;
63
+ locale?: string;
64
+ phone_number?: string;
65
+ phone_number_verified?: boolean;
66
+ address?: AddressClaim;
67
+ updated_at?: number;
68
+ /**
69
+ * Authentication time (Unix timestamp).
70
+ */
71
+ auth_time?: number;
72
+ /**
73
+ * Nonce value for replay protection.
74
+ */
75
+ nonce?: string;
76
+ /**
77
+ * Transaction identifier.
78
+ */
79
+ txn?: string;
80
+ /**
81
+ * Authentication Context Class Reference.
82
+ */
83
+ acr?: string;
84
+ /**
85
+ * Authentication Methods References.
86
+ */
87
+ amr?: string[];
88
+ /**
89
+ * Authorized party (client ID of the party to which the ID token was issued).
90
+ */
91
+ azp?: string;
92
+ /**
93
+ * Verified claims for extended attributes.
94
+ */
95
+ verified_claims?: VerifiedClaims;
96
+ /**
97
+ * Allows for additional custom claims.
98
+ */
99
+ [key: string]: unknown;
100
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,74 @@
1
+ import { IdTokenClaims } from './claims.js';
2
+ import { TokenSet } from './token-set.js';
3
+ import { ConsolidatedTokenSet as IConsolidatedTokenSet } from '../types.js';
4
+ /**
5
+ * Consolidated Token Set
6
+ *
7
+ * Wraps a TokenSet and provides additional convenience methods
8
+ * for accessing token data and claims.
9
+ *
10
+ * Implements the ConsolidatedTokenSet interface from types.ts.
11
+ */
12
+ export declare class ConsolidatedTokenSet implements IConsolidatedTokenSet {
13
+ private tokenSet;
14
+ readonly xFapiInteractionId: string;
15
+ /**
16
+ * Creates a new ConsolidatedTokenSet.
17
+ *
18
+ * @param tokenSet - Validated token set
19
+ * @param xFapiInteractionId - FAPI interaction ID from the response
20
+ */
21
+ constructor(tokenSet: TokenSet, xFapiInteractionId: string);
22
+ get access_token(): string | undefined;
23
+ get token_type(): string | undefined;
24
+ get expires_in(): number | undefined;
25
+ get refresh_token(): string | undefined;
26
+ get scope(): string | undefined;
27
+ get id_token(): string | undefined;
28
+ /**
29
+ * Checks if the access token has expired.
30
+ *
31
+ * @returns true if the token is expired, false otherwise
32
+ */
33
+ expired(): boolean;
34
+ /**
35
+ * Returns the parsed ID token claims.
36
+ *
37
+ * @returns Parsed and validated ID token claims
38
+ */
39
+ claims(): IdTokenClaims;
40
+ /**
41
+ * Returns consolidated claims with verified_claims merged into top level.
42
+ *
43
+ * This method extracts extended claims from the verified_claims structure
44
+ * and merges them into the top-level claims object for easier access.
45
+ *
46
+ * For example, if the ID token contains:
47
+ * ```json
48
+ * {
49
+ * "sub": "12345",
50
+ * "name": "John Doe",
51
+ * "verified_claims": {
52
+ * "claims": {
53
+ * "over18": true,
54
+ * "over21": false
55
+ * }
56
+ * }
57
+ * }
58
+ * ```
59
+ *
60
+ * This method will return:
61
+ * ```json
62
+ * {
63
+ * "sub": "12345",
64
+ * "name": "John Doe",
65
+ * "over18": true,
66
+ * "over21": false,
67
+ * "verified_claims": { ... }
68
+ * }
69
+ * ```
70
+ *
71
+ * @returns Consolidated claims object
72
+ */
73
+ consolidatedClaims(): IdTokenClaims;
74
+ }
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Consolidated Token Set
3
+ *
4
+ * Wraps a TokenSet and provides additional convenience methods
5
+ * for accessing token data and claims.
6
+ *
7
+ * Implements the ConsolidatedTokenSet interface from types.ts.
8
+ */
9
+ export class ConsolidatedTokenSet {
10
+ /**
11
+ * Creates a new ConsolidatedTokenSet.
12
+ *
13
+ * @param tokenSet - Validated token set
14
+ * @param xFapiInteractionId - FAPI interaction ID from the response
15
+ */
16
+ constructor(tokenSet, xFapiInteractionId) {
17
+ this.tokenSet = tokenSet;
18
+ this.xFapiInteractionId = xFapiInteractionId;
19
+ }
20
+ // Delegate token properties to underlying TokenSet
21
+ get access_token() {
22
+ return this.tokenSet.access_token;
23
+ }
24
+ get token_type() {
25
+ return this.tokenSet.token_type;
26
+ }
27
+ get expires_in() {
28
+ return this.tokenSet.expires_in;
29
+ }
30
+ get refresh_token() {
31
+ return this.tokenSet.refresh_token;
32
+ }
33
+ get scope() {
34
+ return this.tokenSet.scope;
35
+ }
36
+ get id_token() {
37
+ return this.tokenSet.id_token;
38
+ }
39
+ /**
40
+ * Checks if the access token has expired.
41
+ *
42
+ * @returns true if the token is expired, false otherwise
43
+ */
44
+ expired() {
45
+ return this.tokenSet.expired();
46
+ }
47
+ /**
48
+ * Returns the parsed ID token claims.
49
+ *
50
+ * @returns Parsed and validated ID token claims
51
+ */
52
+ claims() {
53
+ return this.tokenSet.claims();
54
+ }
55
+ /**
56
+ * Returns consolidated claims with verified_claims merged into top level.
57
+ *
58
+ * This method extracts extended claims from the verified_claims structure
59
+ * and merges them into the top-level claims object for easier access.
60
+ *
61
+ * For example, if the ID token contains:
62
+ * ```json
63
+ * {
64
+ * "sub": "12345",
65
+ * "name": "John Doe",
66
+ * "verified_claims": {
67
+ * "claims": {
68
+ * "over18": true,
69
+ * "over21": false
70
+ * }
71
+ * }
72
+ * }
73
+ * ```
74
+ *
75
+ * This method will return:
76
+ * ```json
77
+ * {
78
+ * "sub": "12345",
79
+ * "name": "John Doe",
80
+ * "over18": true,
81
+ * "over21": false,
82
+ * "verified_claims": { ... }
83
+ * }
84
+ * ```
85
+ *
86
+ * @returns Consolidated claims object
87
+ */
88
+ consolidatedClaims() {
89
+ const claims = this.claims();
90
+ // If there are no verified_claims, return claims as-is
91
+ if (!claims.verified_claims?.claims) {
92
+ return claims;
93
+ }
94
+ // Merge verified_claims.claims into top level
95
+ return {
96
+ ...claims,
97
+ ...claims.verified_claims.claims,
98
+ };
99
+ }
100
+ }
@@ -0,0 +1,46 @@
1
+ import { Agent } from 'undici';
2
+ import { IssuerMetadata } from './issuer-metadata.js';
3
+ import { JWKSet } from './jwks.js';
4
+ /**
5
+ * Service for fetching OIDC discovery documents and JWKS.
6
+ *
7
+ * Handles fetching and parsing of OpenID Connect discovery documents
8
+ * and JSON Web Key Sets from authorization servers.
9
+ */
10
+ export declare class DiscoveryService {
11
+ /**
12
+ * Fetches and parses an OIDC discovery document.
13
+ *
14
+ * @param discoveryUrl - URL to the .well-known/openid-configuration endpoint
15
+ * @param httpAgent - Optional undici Agent for mTLS
16
+ * @returns Parsed issuer metadata
17
+ * @throws Error if the discovery document cannot be fetched or parsed
18
+ */
19
+ static fetchDiscoveryDocument(discoveryUrl: string, httpAgent?: Agent): Promise<IssuerMetadata>;
20
+ /**
21
+ * Fetches and parses a JWKS document.
22
+ *
23
+ * @param jwksUri - URL to the JWKS endpoint
24
+ * @param httpAgent - Optional HTTPS agent for mTLS
25
+ * @returns Parsed JWKS
26
+ * @throws Error if the JWKS cannot be fetched or parsed
27
+ */
28
+ static fetchJwks(jwksUri: string, httpAgent?: Agent): Promise<JWKSet>;
29
+ /**
30
+ * Validates that required discovery document fields are present.
31
+ *
32
+ * @param metadata - Discovery document to validate
33
+ * @throws Error if required fields are missing
34
+ */
35
+ private static validateDiscoveryDocument;
36
+ /**
37
+ * Applies mtls_endpoint_aliases to override standard endpoints.
38
+ *
39
+ * If mtls_endpoint_aliases are present, they should be used instead of
40
+ * the standard endpoints for certificate-bound operations.
41
+ *
42
+ * @param metadata - Original discovery metadata
43
+ * @returns Metadata with mTLS aliases applied
44
+ */
45
+ private static applyMtlsAliases;
46
+ }
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Service for fetching OIDC discovery documents and JWKS.
3
+ *
4
+ * Handles fetching and parsing of OpenID Connect discovery documents
5
+ * and JSON Web Key Sets from authorization servers.
6
+ */
7
+ export class DiscoveryService {
8
+ /**
9
+ * Fetches and parses an OIDC discovery document.
10
+ *
11
+ * @param discoveryUrl - URL to the .well-known/openid-configuration endpoint
12
+ * @param httpAgent - Optional undici Agent for mTLS
13
+ * @returns Parsed issuer metadata
14
+ * @throws Error if the discovery document cannot be fetched or parsed
15
+ */
16
+ static async fetchDiscoveryDocument(discoveryUrl, httpAgent) {
17
+ try {
18
+ const response = await fetch(discoveryUrl, {
19
+ method: 'GET',
20
+ headers: {
21
+ Accept: 'application/json',
22
+ },
23
+ dispatcher: httpAgent, // undici uses 'dispatcher' instead of 'agent'
24
+ });
25
+ if (!response.ok) {
26
+ throw new Error(`Failed to fetch discovery document: ${response.status} ${response.statusText}`);
27
+ }
28
+ const metadata = (await response.json());
29
+ // Validate required fields
30
+ this.validateDiscoveryDocument(metadata);
31
+ // Apply mtls_endpoint_aliases if present
32
+ return this.applyMtlsAliases(metadata);
33
+ }
34
+ catch (error) {
35
+ throw new Error(`Failed to fetch discovery document from ${discoveryUrl}: ${error instanceof Error ? error.message : String(error)}`);
36
+ }
37
+ }
38
+ /**
39
+ * Fetches and parses a JWKS document.
40
+ *
41
+ * @param jwksUri - URL to the JWKS endpoint
42
+ * @param httpAgent - Optional HTTPS agent for mTLS
43
+ * @returns Parsed JWKS
44
+ * @throws Error if the JWKS cannot be fetched or parsed
45
+ */
46
+ static async fetchJwks(jwksUri, httpAgent) {
47
+ try {
48
+ const response = await fetch(jwksUri, {
49
+ method: 'GET',
50
+ headers: {
51
+ Accept: 'application/json',
52
+ },
53
+ dispatcher: httpAgent, // undici uses 'dispatcher' instead of 'agent'
54
+ });
55
+ if (!response.ok) {
56
+ throw new Error(`Failed to fetch JWKS: ${response.status} ${response.statusText}`);
57
+ }
58
+ const jwks = (await response.json());
59
+ // Validate JWKS structure
60
+ if (!jwks.keys || !Array.isArray(jwks.keys)) {
61
+ throw new Error('Invalid JWKS: missing or invalid keys array');
62
+ }
63
+ return jwks;
64
+ }
65
+ catch (error) {
66
+ throw new Error(`Failed to fetch JWKS from ${jwksUri}: ${error instanceof Error ? error.message : String(error)}`);
67
+ }
68
+ }
69
+ /**
70
+ * Validates that required discovery document fields are present.
71
+ *
72
+ * @param metadata - Discovery document to validate
73
+ * @throws Error if required fields are missing
74
+ */
75
+ static validateDiscoveryDocument(metadata) {
76
+ const requiredFields = [
77
+ 'issuer',
78
+ 'authorization_endpoint',
79
+ 'token_endpoint',
80
+ 'jwks_uri',
81
+ ];
82
+ for (const field of requiredFields) {
83
+ if (!metadata[field]) {
84
+ throw new Error(`Discovery document missing required field: ${field}`);
85
+ }
86
+ }
87
+ }
88
+ /**
89
+ * Applies mtls_endpoint_aliases to override standard endpoints.
90
+ *
91
+ * If mtls_endpoint_aliases are present, they should be used instead of
92
+ * the standard endpoints for certificate-bound operations.
93
+ *
94
+ * @param metadata - Original discovery metadata
95
+ * @returns Metadata with mTLS aliases applied
96
+ */
97
+ static applyMtlsAliases(metadata) {
98
+ if (!metadata.mtls_endpoint_aliases) {
99
+ return metadata;
100
+ }
101
+ const aliases = metadata.mtls_endpoint_aliases;
102
+ return {
103
+ ...metadata,
104
+ token_endpoint: aliases.token_endpoint || metadata.token_endpoint,
105
+ pushed_authorization_request_endpoint: aliases.pushed_authorization_request_endpoint ||
106
+ metadata.pushed_authorization_request_endpoint,
107
+ userinfo_endpoint: aliases.userinfo_endpoint || metadata.userinfo_endpoint,
108
+ revocation_endpoint: aliases.revocation_endpoint || metadata.revocation_endpoint,
109
+ introspection_endpoint: aliases.introspection_endpoint || metadata.introspection_endpoint,
110
+ };
111
+ }
112
+ }
@@ -0,0 +1,165 @@
1
+ /**
2
+ * OIDC Provider Metadata
3
+ *
4
+ * Represents the OpenID Connect Discovery document as defined in
5
+ * OpenID Connect Discovery 1.0.
6
+ *
7
+ * @see https://openid.net/specs/openid-connect-discovery-1_0.html
8
+ */
9
+ export interface IssuerMetadata {
10
+ /**
11
+ * URL using the https scheme with no query or fragment component
12
+ * that the OP asserts as its Issuer Identifier.
13
+ */
14
+ issuer: string;
15
+ /**
16
+ * URL of the OP's OAuth 2.0 Authorization Endpoint.
17
+ */
18
+ authorization_endpoint: string;
19
+ /**
20
+ * URL of the OP's OAuth 2.0 Token Endpoint.
21
+ */
22
+ token_endpoint: string;
23
+ /**
24
+ * URL of the OP's JSON Web Key Set document.
25
+ */
26
+ jwks_uri: string;
27
+ /**
28
+ * URL of the OP's UserInfo Endpoint.
29
+ */
30
+ userinfo_endpoint?: string;
31
+ /**
32
+ * URL of the OP's Pushed Authorization Request Endpoint (RFC 9126).
33
+ */
34
+ pushed_authorization_request_endpoint?: string;
35
+ /**
36
+ * URL of the OP's Registration Endpoint.
37
+ */
38
+ registration_endpoint?: string;
39
+ /**
40
+ * URL that the OpenID Provider provides to revoke tokens.
41
+ */
42
+ revocation_endpoint?: string;
43
+ /**
44
+ * URL of the OP's Token Introspection Endpoint.
45
+ */
46
+ introspection_endpoint?: string;
47
+ /**
48
+ * URL of the OP's Logout Endpoint.
49
+ */
50
+ end_session_endpoint?: string;
51
+ /**
52
+ * MTLS endpoint aliases for certificate-bound tokens.
53
+ */
54
+ mtls_endpoint_aliases?: {
55
+ token_endpoint?: string;
56
+ revocation_endpoint?: string;
57
+ introspection_endpoint?: string;
58
+ userinfo_endpoint?: string;
59
+ pushed_authorization_request_endpoint?: string;
60
+ };
61
+ /**
62
+ * List of OAuth 2.0 response_type values that this OP supports.
63
+ */
64
+ response_types_supported?: string[];
65
+ /**
66
+ * List of OAuth 2.0 response_mode values that this OP supports.
67
+ */
68
+ response_modes_supported?: string[];
69
+ /**
70
+ * List of OAuth 2.0 grant types supported.
71
+ */
72
+ grant_types_supported?: string[];
73
+ /**
74
+ * List of the OAuth 2.0 scope values supported.
75
+ */
76
+ scopes_supported?: string[];
77
+ /**
78
+ * List of the Subject Identifier types supported.
79
+ */
80
+ subject_types_supported?: string[];
81
+ /**
82
+ * List of the JWS signing algorithms supported for the ID Token.
83
+ */
84
+ id_token_signing_alg_values_supported?: string[];
85
+ /**
86
+ * List of the JWS signing algorithms supported for Request Objects.
87
+ */
88
+ request_object_signing_alg_values_supported?: string[];
89
+ /**
90
+ * List of Client Authentication methods supported by the Token Endpoint.
91
+ */
92
+ token_endpoint_auth_methods_supported?: string[];
93
+ /**
94
+ * List of the JWS signing algorithms supported for Client Authentication.
95
+ */
96
+ token_endpoint_auth_signing_alg_values_supported?: string[];
97
+ /**
98
+ * List of Claim Names of the Claims that the OP MAY be able to supply values for.
99
+ */
100
+ claims_supported?: string[];
101
+ /**
102
+ * List of the Claim Types that the OP supports.
103
+ */
104
+ claim_types_supported?: string[];
105
+ /**
106
+ * Languages and scripts supported for values in Claims.
107
+ */
108
+ claims_locales_supported?: string[];
109
+ /**
110
+ * Languages and scripts supported for the UI.
111
+ */
112
+ ui_locales_supported?: string[];
113
+ /**
114
+ * URL of a page containing human-readable information about the OP's requirements.
115
+ */
116
+ service_documentation?: string;
117
+ /**
118
+ * URL that the OP provides for the Relying Party to read about policies.
119
+ */
120
+ op_policy_uri?: string;
121
+ /**
122
+ * URL that the OP provides for the Relying Party to read about terms of service.
123
+ */
124
+ op_tos_uri?: string;
125
+ /**
126
+ * Boolean value specifying whether the OP supports use of the claims parameter.
127
+ */
128
+ claims_parameter_supported?: boolean;
129
+ /**
130
+ * Boolean value specifying whether the OP supports use of the request parameter.
131
+ */
132
+ request_parameter_supported?: boolean;
133
+ /**
134
+ * Boolean value specifying whether the OP supports use of the request_uri parameter.
135
+ */
136
+ request_uri_parameter_supported?: boolean;
137
+ /**
138
+ * Boolean value specifying whether the OP requires request_uri values to be pre-registered.
139
+ */
140
+ require_request_uri_registration?: boolean;
141
+ /**
142
+ * URL of the authorization server's code_challenge_methods_supported.
143
+ */
144
+ code_challenge_methods_supported?: string[];
145
+ /**
146
+ * Boolean indicating support for TLS client certificate bound access tokens.
147
+ */
148
+ tls_client_certificate_bound_access_tokens?: boolean;
149
+ /**
150
+ * Boolean indicating whether PAR is required.
151
+ */
152
+ require_pushed_authorization_requests?: boolean;
153
+ /**
154
+ * ACR values supported.
155
+ */
156
+ acr_values_supported?: string[];
157
+ /**
158
+ * Boolean indicating whether signed request object is required.
159
+ */
160
+ require_signed_request_object?: boolean;
161
+ /**
162
+ * Allows for additional custom metadata fields.
163
+ */
164
+ [key: string]: unknown;
165
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { JWK } from 'jose';
2
+ /**
3
+ * JSON Web Key Set
4
+ *
5
+ * A set of JSON Web Keys as defined in RFC 7517.
6
+ */
7
+ export interface JWKSet {
8
+ /**
9
+ * Array of JSON Web Key values.
10
+ */
11
+ keys: JWK[];
12
+ }
package/model/jwks.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ /**
2
+ * OAuth 2.0 Token Response
3
+ *
4
+ * Represents the response from the token endpoint as defined in RFC 6749.
5
+ */
6
+ export interface TokenResponse {
7
+ /**
8
+ * The access token issued by the authorization server.
9
+ */
10
+ access_token?: string;
11
+ /**
12
+ * The type of token issued (typically "Bearer").
13
+ */
14
+ token_type?: string;
15
+ /**
16
+ * The lifetime in seconds of the access token.
17
+ */
18
+ expires_in?: number;
19
+ /**
20
+ * The refresh token for obtaining new access tokens.
21
+ */
22
+ refresh_token?: string;
23
+ /**
24
+ * The scope of the access token.
25
+ */
26
+ scope?: string;
27
+ /**
28
+ * The ID token (OIDC extension to OAuth 2.0).
29
+ */
30
+ id_token?: string;
31
+ }
@@ -0,0 +1 @@
1
+ export {};