@_mustachio/openauth 0.10.0 → 0.12.0
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/esm/adapters/d1/index.js +18 -9
- package/dist/esm/adapters/d1/migrations.js +7 -2
- package/dist/esm/adapters/d1/session-store.js +39 -0
- package/dist/esm/adapters/d1/session.js +2 -2
- package/dist/esm/adapters/durable-object/index.js +4 -0
- package/dist/esm/adapters/durable-object/session-store.js +42 -0
- package/dist/esm/adapters/dynamo/index.js +24 -7
- package/dist/esm/adapters/dynamo/session-store.js +49 -0
- package/dist/esm/adapters/kms/index.js +6 -2
- package/dist/esm/adapters/kv/index.js +6 -2
- package/dist/esm/adapters/memory/index.js +24 -7
- package/dist/esm/adapters/memory/session-store.js +45 -0
- package/dist/esm/adapters/memory/token-store.js +13 -0
- package/dist/esm/adapters/postgres/executor.js +2 -2
- package/dist/esm/adapters/postgres/index.js +33 -10
- package/dist/esm/adapters/postgres/migrations.js +8 -2
- package/dist/esm/adapters/postgres/session-store.js +42 -0
- package/dist/esm/client.js +35 -28
- package/dist/esm/domain/authorize.js +7 -2
- package/dist/esm/domain/callback.js +124 -7
- package/dist/esm/domain/client-auth.js +2 -2
- package/dist/esm/domain/crypto.js +14 -14
- package/dist/esm/domain/discovery.js +46 -4
- package/dist/esm/domain/dpop.js +122 -0
- package/dist/esm/domain/id-token.js +94 -0
- package/dist/esm/domain/introspect.js +5 -1
- package/dist/esm/domain/jwt.js +30 -2
- package/dist/esm/domain/logout.js +75 -0
- package/dist/esm/domain/method-dispatch.js +27 -1
- package/dist/esm/domain/method-route.js +83 -1
- package/dist/esm/domain/par.js +51 -0
- package/dist/esm/domain/pkce.js +2 -2
- package/dist/esm/domain/refresh.js +12 -1
- package/dist/esm/domain/register.js +74 -0
- package/dist/esm/domain/revoke.js +2 -2
- package/dist/esm/domain/state-envelope.js +2 -2
- package/dist/esm/domain/token-exchange.js +1 -0
- package/dist/esm/domain/token.js +53 -12
- package/dist/esm/domain/userinfo.js +38 -3
- package/dist/esm/error.js +8 -8
- package/dist/esm/http/cookies.js +19 -2
- package/dist/esm/http/errors.js +4 -4
- package/dist/esm/http/handlers/authorize.js +92 -21
- package/dist/esm/http/handlers/callback.js +7 -1
- package/dist/esm/http/handlers/end-session.js +64 -0
- package/dist/esm/http/handlers/metadata.js +7 -4
- package/dist/esm/http/handlers/method-route.js +47 -2
- package/dist/esm/http/handlers/par.js +53 -0
- package/dist/esm/http/handlers/register.js +46 -0
- package/dist/esm/http/handlers/revocation.js +2 -2
- package/dist/esm/http/handlers/token.js +36 -6
- package/dist/esm/http/handlers/userinfo.js +35 -29
- package/dist/esm/http/middleware/tenant.js +6 -6
- package/dist/esm/http/router.js +10 -0
- package/dist/esm/http/schemas/authorize.js +8 -2
- package/dist/esm/http/schemas/end-session.js +13 -0
- package/dist/esm/http/schemas/par.js +9 -0
- package/dist/esm/http/schemas/register.js +16 -0
- package/dist/esm/http/schemas/revocation.js +2 -2
- package/dist/esm/http/schemas/token.js +7 -7
- package/dist/esm/index.js +40 -34
- package/dist/esm/methods/oauth2-factory.js +2 -2
- package/dist/esm/methods/password-hash.js +2 -2
- package/dist/esm/methods/providers/index.js +30 -14
- package/dist/esm/methods/saml-sp/acs.js +208 -0
- package/dist/esm/methods/saml-sp/attributes.js +75 -0
- package/dist/esm/methods/saml-sp/authnrequest.js +63 -0
- package/dist/esm/methods/saml-sp/cache-provider.js +33 -0
- package/dist/esm/methods/saml-sp/cert-rotation.js +13 -0
- package/dist/esm/methods/saml-sp/factory.js +70 -0
- package/dist/esm/methods/saml-sp/index.js +7 -0
- package/dist/esm/methods/saml-sp/metadata.js +69 -0
- package/dist/esm/methods/saml-sp/method.js +29 -0
- package/dist/esm/methods/saml-sp/parse-idp-metadata.js +102 -0
- package/dist/esm/methods/saml-sp/saml-instance.js +49 -0
- package/dist/esm/methods/saml-sp/slo-initiate.js +84 -0
- package/dist/esm/methods/saml-sp/sls.js +154 -0
- package/dist/esm/methods/saml-sp/types.js +0 -0
- package/dist/esm/types/error.js +5 -0
- package/dist/esm/types/result.js +3 -3
- package/dist/esm/ui/forms.js +3 -3
- package/dist/esm/ui/index.js +8 -5
- package/dist/esm/ui/picker.js +2 -2
- package/dist/types/adapters/d1/migrations.d.ts.map +1 -1
- package/dist/types/adapters/d1/session-store.d.ts +3 -0
- package/dist/types/adapters/d1/session-store.d.ts.map +1 -1
- package/dist/types/adapters/durable-object/session-store.d.ts +3 -0
- package/dist/types/adapters/durable-object/session-store.d.ts.map +1 -1
- package/dist/types/adapters/dynamo/session-store.d.ts +3 -0
- package/dist/types/adapters/dynamo/session-store.d.ts.map +1 -1
- package/dist/types/adapters/memory/session-store.d.ts +6 -1
- package/dist/types/adapters/memory/session-store.d.ts.map +1 -1
- package/dist/types/adapters/memory/token-store.d.ts +1 -0
- package/dist/types/adapters/memory/token-store.d.ts.map +1 -1
- package/dist/types/adapters/postgres/migrations.d.ts +1 -1
- package/dist/types/adapters/postgres/migrations.d.ts.map +1 -1
- package/dist/types/adapters/postgres/session-store.d.ts +3 -0
- package/dist/types/adapters/postgres/session-store.d.ts.map +1 -1
- package/dist/types/client.d.ts +19 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/domain/authorize.d.ts.map +1 -1
- package/dist/types/domain/callback.d.ts +16 -1
- package/dist/types/domain/callback.d.ts.map +1 -1
- package/dist/types/domain/client-credentials.d.ts +2 -0
- package/dist/types/domain/client-credentials.d.ts.map +1 -1
- package/dist/types/domain/discovery.d.ts +37 -0
- package/dist/types/domain/discovery.d.ts.map +1 -1
- package/dist/types/domain/dpop.d.ts +61 -0
- package/dist/types/domain/dpop.d.ts.map +1 -0
- package/dist/types/domain/id-token.d.ts +83 -0
- package/dist/types/domain/id-token.d.ts.map +1 -0
- package/dist/types/domain/introspect.d.ts +8 -0
- package/dist/types/domain/introspect.d.ts.map +1 -1
- package/dist/types/domain/jwt.d.ts +27 -1
- package/dist/types/domain/jwt.d.ts.map +1 -1
- package/dist/types/domain/logout.d.ts +69 -0
- package/dist/types/domain/logout.d.ts.map +1 -0
- package/dist/types/domain/method-dispatch.d.ts.map +1 -1
- package/dist/types/domain/method-route.d.ts +57 -1
- package/dist/types/domain/method-route.d.ts.map +1 -1
- package/dist/types/domain/par.d.ts +62 -0
- package/dist/types/domain/par.d.ts.map +1 -0
- package/dist/types/domain/refresh.d.ts +9 -0
- package/dist/types/domain/refresh.d.ts.map +1 -1
- package/dist/types/domain/register.d.ts +33 -0
- package/dist/types/domain/register.d.ts.map +1 -0
- package/dist/types/domain/token-exchange.d.ts +2 -0
- package/dist/types/domain/token-exchange.d.ts.map +1 -1
- package/dist/types/domain/token.d.ts +41 -1
- package/dist/types/domain/token.d.ts.map +1 -1
- package/dist/types/domain/userinfo.d.ts +44 -5
- package/dist/types/domain/userinfo.d.ts.map +1 -1
- package/dist/types/http/context.d.ts +6 -1
- package/dist/types/http/context.d.ts.map +1 -1
- package/dist/types/http/cookies.d.ts +9 -1
- package/dist/types/http/cookies.d.ts.map +1 -1
- package/dist/types/http/handlers/authorize.d.ts.map +1 -1
- package/dist/types/http/handlers/callback.d.ts.map +1 -1
- package/dist/types/http/handlers/end-session.d.ts +3 -0
- package/dist/types/http/handlers/end-session.d.ts.map +1 -0
- package/dist/types/http/handlers/metadata.d.ts +1 -1
- package/dist/types/http/handlers/metadata.d.ts.map +1 -1
- package/dist/types/http/handlers/method-route.d.ts.map +1 -1
- package/dist/types/http/handlers/par.d.ts +3 -0
- package/dist/types/http/handlers/par.d.ts.map +1 -0
- package/dist/types/http/handlers/register.d.ts +3 -0
- package/dist/types/http/handlers/register.d.ts.map +1 -0
- package/dist/types/http/handlers/token.d.ts.map +1 -1
- package/dist/types/http/handlers/userinfo.d.ts.map +1 -1
- package/dist/types/http/router.d.ts.map +1 -1
- package/dist/types/http/schemas/authorize.d.ts +40 -0
- package/dist/types/http/schemas/authorize.d.ts.map +1 -1
- package/dist/types/http/schemas/end-session.d.ts +31 -0
- package/dist/types/http/schemas/end-session.d.ts.map +1 -0
- package/dist/types/http/schemas/par.d.ts +20 -0
- package/dist/types/http/schemas/par.d.ts.map +1 -0
- package/dist/types/http/schemas/register.d.ts +42 -0
- package/dist/types/http/schemas/register.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/methods/saml-sp/acs.d.ts +4 -0
- package/dist/types/methods/saml-sp/acs.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/attributes.d.ts +40 -0
- package/dist/types/methods/saml-sp/attributes.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/authnrequest.d.ts +4 -0
- package/dist/types/methods/saml-sp/authnrequest.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/cache-provider.d.ts +38 -0
- package/dist/types/methods/saml-sp/cache-provider.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/cert-rotation.d.ts +23 -0
- package/dist/types/methods/saml-sp/cert-rotation.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/factory.d.ts +704 -0
- package/dist/types/methods/saml-sp/factory.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/index.d.ts +24 -0
- package/dist/types/methods/saml-sp/index.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/metadata.d.ts +42 -0
- package/dist/types/methods/saml-sp/metadata.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/method.d.ts +17 -0
- package/dist/types/methods/saml-sp/method.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/parse-idp-metadata.d.ts +4 -0
- package/dist/types/methods/saml-sp/parse-idp-metadata.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/saml-instance.d.ts +81 -0
- package/dist/types/methods/saml-sp/saml-instance.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/slo-initiate.d.ts +4 -0
- package/dist/types/methods/saml-sp/slo-initiate.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/sls.d.ts +4 -0
- package/dist/types/methods/saml-sp/sls.d.ts.map +1 -0
- package/dist/types/methods/saml-sp/types.d.ts +204 -0
- package/dist/types/methods/saml-sp/types.d.ts.map +1 -0
- package/dist/types/ports/audit-log.d.ts +40 -0
- package/dist/types/ports/audit-log.d.ts.map +1 -1
- package/dist/types/ports/session-store.d.ts +50 -0
- package/dist/types/ports/session-store.d.ts.map +1 -1
- package/dist/types/ports/token-store.d.ts +12 -0
- package/dist/types/ports/token-store.d.ts.map +1 -1
- package/dist/types/types/authorization.d.ts +23 -0
- package/dist/types/types/authorization.d.ts.map +1 -1
- package/dist/types/types/error.d.ts +9 -0
- package/dist/types/types/error.d.ts.map +1 -1
- package/dist/types/types/flow.d.ts +10 -0
- package/dist/types/types/flow.d.ts.map +1 -1
- package/dist/types/types/idp.d.ts +162 -1
- package/dist/types/types/idp.d.ts.map +1 -1
- package/dist/types/types/method.d.ts +109 -0
- package/dist/types/types/method.d.ts.map +1 -1
- package/dist/types/types/tenant.d.ts +37 -0
- package/dist/types/types/tenant.d.ts.map +1 -1
- package/dist/types/types/token.d.ts +128 -0
- package/dist/types/types/token.d.ts.map +1 -1
- package/package.json +9 -1
- package/src/adapters/d1/migrations.ts +5 -0
- package/src/adapters/d1/session-store.ts +68 -0
- package/src/adapters/durable-object/session-store.ts +61 -0
- package/src/adapters/dynamo/session-store.ts +63 -0
- package/src/adapters/memory/session-store.ts +83 -1
- package/src/adapters/memory/token-store.ts +16 -0
- package/src/adapters/postgres/migrations.ts +6 -0
- package/src/adapters/postgres/session-store.ts +69 -0
- package/src/client.ts +32 -0
- package/src/domain/authorize.ts +9 -0
- package/src/domain/callback.ts +220 -7
- package/src/domain/client-credentials.ts +2 -0
- package/src/domain/discovery.ts +80 -2
- package/src/domain/dpop.ts +293 -0
- package/src/domain/id-token.ts +213 -0
- package/src/domain/introspect.ts +10 -0
- package/src/domain/jwt.ts +80 -1
- package/src/domain/logout.ts +180 -0
- package/src/domain/method-dispatch.ts +53 -1
- package/src/domain/method-route.ts +195 -1
- package/src/domain/par.ts +141 -0
- package/src/domain/refresh.ts +41 -0
- package/src/domain/register.ts +168 -0
- package/src/domain/token-exchange.ts +11 -0
- package/src/domain/token.ts +134 -8
- package/src/domain/userinfo.ts +121 -6
- package/src/http/context.ts +10 -0
- package/src/http/cookies.ts +19 -1
- package/src/http/handlers/authorize.ts +146 -24
- package/src/http/handlers/callback.ts +9 -1
- package/src/http/handlers/end-session.ts +106 -0
- package/src/http/handlers/metadata.ts +7 -2
- package/src/http/handlers/method-route.ts +75 -2
- package/src/http/handlers/par.ts +84 -0
- package/src/http/handlers/register.ts +70 -0
- package/src/http/handlers/token.ts +56 -0
- package/src/http/handlers/userinfo.ts +62 -38
- package/src/http/router.ts +19 -0
- package/src/http/schemas/authorize.ts +27 -0
- package/src/http/schemas/end-session.ts +23 -0
- package/src/http/schemas/par.ts +23 -0
- package/src/http/schemas/register.ts +29 -0
- package/src/index.ts +21 -1
- package/src/methods/saml-sp/acs.ts +399 -0
- package/src/methods/saml-sp/attributes.ts +137 -0
- package/src/methods/saml-sp/authnrequest.ts +128 -0
- package/src/methods/saml-sp/cache-provider.ts +76 -0
- package/src/methods/saml-sp/cert-rotation.ts +34 -0
- package/src/methods/saml-sp/factory.ts +118 -0
- package/src/methods/saml-sp/index.ts +34 -0
- package/src/methods/saml-sp/metadata.ts +204 -0
- package/src/methods/saml-sp/method.ts +65 -0
- package/src/methods/saml-sp/parse-idp-metadata.ts +164 -0
- package/src/methods/saml-sp/saml-instance.ts +173 -0
- package/src/methods/saml-sp/slo-initiate.ts +177 -0
- package/src/methods/saml-sp/sls.ts +306 -0
- package/src/methods/saml-sp/types.ts +203 -0
- package/src/ports/CONSISTENCY.md +77 -21
- package/src/ports/audit-log.ts +42 -0
- package/src/ports/session-store.ts +61 -0
- package/src/ports/token-store.ts +13 -0
- package/src/types/authorization.ts +25 -0
- package/src/types/error.ts +23 -0
- package/src/types/flow.ts +10 -0
- package/src/types/idp.ts +170 -0
- package/src/types/method.ts +110 -0
- package/src/types/tenant.ts +37 -0
- package/src/types/token.ts +135 -0
package/src/types/token.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Per AD9, access tokens are JWTs (ES256 by default, Ed25519 optional per
|
|
7
7
|
* AD11) and refresh tokens are opaque server-side records.
|
|
8
8
|
*/
|
|
9
|
+
import type { ClaimsRequest } from "./authorization"
|
|
9
10
|
import type { SubjectClaim } from "./subject"
|
|
10
11
|
import type { TenantId } from "./tenant"
|
|
11
12
|
|
|
@@ -37,10 +38,106 @@ export type CodePayload = {
|
|
|
37
38
|
providerSubject: string
|
|
38
39
|
/** Typed-per-method properties from `MethodResult.success`. */
|
|
39
40
|
properties: unknown
|
|
41
|
+
/**
|
|
42
|
+
* Relying party's OIDC `nonce` (OIDC Core §3.1.2.1). Snapshotted from
|
|
43
|
+
* `FlowRecord.appNonce`. Echoed into the issued `id_token` when present.
|
|
44
|
+
*/
|
|
45
|
+
appNonce?: string
|
|
46
|
+
/**
|
|
47
|
+
* Seconds-since-epoch when end-user authentication completed
|
|
48
|
+
* (OIDC Core §2 `auth_time`). Stamped at the moment the method's
|
|
49
|
+
* `MethodResult.success` fires. Carried into the `id_token` and forward
|
|
50
|
+
* across refresh-token rotations.
|
|
51
|
+
*/
|
|
52
|
+
authTime: number
|
|
53
|
+
/** OIDC Core §5.5 — RP-requested claims; honored at id_token + /userinfo. */
|
|
54
|
+
claimsRequest?: ClaimsRequest
|
|
40
55
|
/** Auth-code TTL is 60 s — framework refuses anything longer. */
|
|
41
56
|
expiresAt: number
|
|
42
57
|
}
|
|
43
58
|
|
|
59
|
+
/**
|
|
60
|
+
* OIDC Core §5.1 `address` claim. Structured object value rather than a
|
|
61
|
+
* scalar — distinct from the rest of the profile fields.
|
|
62
|
+
*/
|
|
63
|
+
export type AddressClaim = {
|
|
64
|
+
formatted?: string
|
|
65
|
+
street_address?: string
|
|
66
|
+
locality?: string
|
|
67
|
+
region?: string
|
|
68
|
+
postal_code?: string
|
|
69
|
+
country?: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* OIDC Core §5.1 profile / email / phone / address claims, gated by the
|
|
74
|
+
* `profile` / `email` / `phone` / `address` scopes via §5.4. Reused by
|
|
75
|
+
* `IdTokenClaims` and the `/userinfo` response so the two surfaces share
|
|
76
|
+
* exactly one source of truth for scope→claim mapping.
|
|
77
|
+
*
|
|
78
|
+
* Every field is optional: presence depends on (a) which scopes were
|
|
79
|
+
* granted and (b) whether the host populated the matching key in
|
|
80
|
+
* `SubjectClaim.properties`.
|
|
81
|
+
*/
|
|
82
|
+
export type ScopedProfileClaims = {
|
|
83
|
+
// `profile` scope
|
|
84
|
+
name?: string
|
|
85
|
+
given_name?: string
|
|
86
|
+
family_name?: string
|
|
87
|
+
middle_name?: string
|
|
88
|
+
nickname?: string
|
|
89
|
+
preferred_username?: string
|
|
90
|
+
profile?: string
|
|
91
|
+
picture?: string
|
|
92
|
+
website?: string
|
|
93
|
+
gender?: string
|
|
94
|
+
birthdate?: string
|
|
95
|
+
zoneinfo?: string
|
|
96
|
+
locale?: string
|
|
97
|
+
updated_at?: number
|
|
98
|
+
// `email` scope
|
|
99
|
+
email?: string
|
|
100
|
+
email_verified?: boolean
|
|
101
|
+
// `phone` scope
|
|
102
|
+
phone_number?: string
|
|
103
|
+
phone_number_verified?: boolean
|
|
104
|
+
// `address` scope
|
|
105
|
+
address?: AddressClaim
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* OIDC `id_token` JWT claims this IdP issues at `/token` when `openid`
|
|
110
|
+
* scope is granted (OIDC Core §2). Distinct from access-token claims:
|
|
111
|
+
*
|
|
112
|
+
* - `aud` is the relying-party `client_id` (not the API audience).
|
|
113
|
+
* - `nonce` echoes the RP's `/authorize` `nonce` parameter when present.
|
|
114
|
+
* - `auth_time` is stable across refresh-token rotations (OIDC Core §12).
|
|
115
|
+
* - `at_hash` is recommended whenever an id_token and access_token are
|
|
116
|
+
* returned in the same response (§3.1.3.6).
|
|
117
|
+
*
|
|
118
|
+
* Standard OIDC claim names use snake_case on the wire; TypeScript field
|
|
119
|
+
* names match to keep the marshalling 1:1.
|
|
120
|
+
*/
|
|
121
|
+
export type IdTokenClaims = ScopedProfileClaims & {
|
|
122
|
+
iss: string
|
|
123
|
+
sub: string
|
|
124
|
+
aud: string
|
|
125
|
+
exp: number
|
|
126
|
+
iat: number
|
|
127
|
+
/** Seconds-since-epoch when end-user auth completed. */
|
|
128
|
+
auth_time?: number
|
|
129
|
+
/** RP-supplied OIDC nonce, when present. MUST equal the `/authorize` value. */
|
|
130
|
+
nonce?: string
|
|
131
|
+
/** Authentication Methods References (RFC 8176). */
|
|
132
|
+
amr?: string[]
|
|
133
|
+
/** Authentication Context Class Reference. */
|
|
134
|
+
acr?: string
|
|
135
|
+
/** Authorized party — the client_id of the party the id_token is for. */
|
|
136
|
+
azp?: string
|
|
137
|
+
/** Access-token hash (OIDC Core §3.1.3.6). */
|
|
138
|
+
at_hash?: string
|
|
139
|
+
}
|
|
140
|
+
|
|
44
141
|
/** Access-token JWT claims this IdP issues. */
|
|
45
142
|
export type AccessTokenClaims = {
|
|
46
143
|
iss: string
|
|
@@ -55,8 +152,28 @@ export type AccessTokenClaims = {
|
|
|
55
152
|
/** Factory kind that originated this token. */
|
|
56
153
|
mkind?: string
|
|
57
154
|
scope?: string
|
|
155
|
+
/**
|
|
156
|
+
* Seconds-since-epoch when the end-user originally authenticated
|
|
157
|
+
* (OIDC Core §2). Stable across refresh-token rotation and across
|
|
158
|
+
* RFC 8693 token-exchange (§12 — exchanging an audience does NOT
|
|
159
|
+
* re-authenticate the user). Absent on `client_credentials` grants
|
|
160
|
+
* where there is no end-user.
|
|
161
|
+
*
|
|
162
|
+
* Carried on the access token so RFC 8693 `subject_token` consumers
|
|
163
|
+
* can propagate it without needing the original id_token. Resource
|
|
164
|
+
* servers typically ignore it; it's there for the IdP's own
|
|
165
|
+
* downstream issuance.
|
|
166
|
+
*/
|
|
167
|
+
auth_time?: number
|
|
58
168
|
/** DPoP confirmation claim (Phase 8). */
|
|
59
169
|
cnf?: { jkt: string }
|
|
170
|
+
/**
|
|
171
|
+
* OIDC Core §5.5 — list of claim names the RP requested for the
|
|
172
|
+
* `/userinfo` response via the `claims` parameter. The resource server
|
|
173
|
+
* surface uses this to bypass scope-gating per §5.5; it is empty /
|
|
174
|
+
* absent when the RP did not use the `claims` parameter.
|
|
175
|
+
*/
|
|
176
|
+
uic?: string[]
|
|
60
177
|
/** The structured subject (matches `SubjectClaim`). Inlined for resource servers. */
|
|
61
178
|
claim: SubjectClaim
|
|
62
179
|
}
|
|
@@ -85,6 +202,24 @@ export type RefreshTokenPayload = {
|
|
|
85
202
|
methodId: string
|
|
86
203
|
/** Factory kind (`MethodConfig.kind`) that originated the chain. */
|
|
87
204
|
methodKind: string
|
|
205
|
+
/**
|
|
206
|
+
* Seconds-since-epoch when end-user authentication originally completed
|
|
207
|
+
* (OIDC Core §2 `auth_time`). Stable across refresh-token rotations —
|
|
208
|
+
* `auth_time` does **not** advance on refresh, only on re-authentication.
|
|
209
|
+
*/
|
|
210
|
+
authTime: number
|
|
211
|
+
/**
|
|
212
|
+
* RFC 7638 JWK thumbprint of the client's DPoP key (RFC 9449 §6.1).
|
|
213
|
+
* Present when the original token grant was DPoP-bound. Refresh-grant
|
|
214
|
+
* rotation REQUIRES a fresh DPoP proof whose thumbprint matches; absent
|
|
215
|
+
* = the token is plain Bearer and Bearer is acceptable on refresh.
|
|
216
|
+
*/
|
|
217
|
+
dpopJkt?: string
|
|
218
|
+
/**
|
|
219
|
+
* OIDC Core §12 — the original RP-requested claims, preserved so
|
|
220
|
+
* refresh-grant id_token + /userinfo responses keep returning them.
|
|
221
|
+
*/
|
|
222
|
+
claimsRequest?: ClaimsRequest
|
|
88
223
|
/** Wall-clock issuance and absolute-expiry timestamps. */
|
|
89
224
|
issuedAt: number
|
|
90
225
|
expiresAt: number
|