@frontmcp/auth 1.8.2 → 1.8.4
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/authorities/authorities.engine.d.ts +25 -2
- package/authorities/authorities.engine.d.ts.map +1 -1
- package/authorities/authorities.validation.d.ts +27 -0
- package/authorities/authorities.validation.d.ts.map +1 -0
- package/authorities/index.d.ts +1 -0
- package/authorities/index.d.ts.map +1 -1
- package/authorization/dcr-client.registry.d.ts +13 -0
- package/authorization/dcr-client.registry.d.ts.map +1 -1
- package/esm/index.mjs +530 -91
- package/esm/package.json +5 -5
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js +615 -166
- package/jwks/jwks.service.d.ts +4 -1
- package/jwks/jwks.service.d.ts.map +1 -1
- package/options/app-auth.schema.d.ts +4 -0
- package/options/app-auth.schema.d.ts.map +1 -1
- package/options/interfaces.d.ts +48 -7
- package/options/interfaces.d.ts.map +1 -1
- package/options/orchestrated.schema.d.ts +8 -0
- package/options/orchestrated.schema.d.ts.map +1 -1
- package/options/schema.d.ts +4 -0
- package/options/schema.d.ts.map +1 -1
- package/options/shared.schemas.d.ts +2 -0
- package/options/shared.schemas.d.ts.map +1 -1
- package/package.json +5 -5
- package/session/authorization.store.d.ts +19 -3
- package/session/authorization.store.d.ts.map +1 -1
- package/session/federated-auth.session.d.ts +16 -0
- package/session/federated-auth.session.d.ts.map +1 -1
- package/session/index.d.ts +4 -0
- package/session/index.d.ts.map +1 -1
- package/session/pending-login.d.ts +23 -0
- package/session/pending-login.d.ts.map +1 -0
- package/session/signin-binding.d.ts +39 -0
- package/session/signin-binding.d.ts.map +1 -0
- package/ui/base-layout.d.ts +26 -0
- package/ui/base-layout.d.ts.map +1 -1
- package/ui/index.d.ts +2 -2
- package/ui/index.d.ts.map +1 -1
- package/ui/local-login.helper.d.ts +9 -2
- package/ui/local-login.helper.d.ts.map +1 -1
- package/ui/templates.d.ts +5 -4
- package/ui/templates.d.ts.map +1 -1
- package/utils/index.d.ts +2 -0
- package/utils/index.d.ts.map +1 -1
- package/utils/redirect-uri.utils.d.ts +16 -0
- package/utils/redirect-uri.utils.d.ts.map +1 -0
- package/utils/scope-grant.utils.d.ts +21 -0
- package/utils/scope-grant.utils.d.ts.map +1 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Prefix of the sign-in binding cookie's name; the rest identifies the pending authorization. */
|
|
2
|
+
export declare const SIGNIN_BINDING_COOKIE_PREFIX = "frontmcp_signin_";
|
|
3
|
+
/** Prefix of the binding cookie's name over https (see {@link SigninBindingCookieOptions.secure}). */
|
|
4
|
+
export declare const SIGNIN_BINDING_SECURE_COOKIE_PREFIX = "__Host-frontmcp_signin_";
|
|
5
|
+
/** How the browser reaches the server, which decides the binding cookie's name. */
|
|
6
|
+
export interface SigninBindingCookieOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The browser reached the server over https. The cookie is then named
|
|
9
|
+
* `__Host-frontmcp_signin_…` and must be set `Secure`, with `Path=/` and no
|
|
10
|
+
* `Domain`; only a cookie of that name counts.
|
|
11
|
+
*/
|
|
12
|
+
secure?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* How long the binding cookie lives, in seconds: long enough for a pending
|
|
16
|
+
* authorization (10 minutes) followed by a federated session (15 minutes).
|
|
17
|
+
*/
|
|
18
|
+
export declare const SIGNIN_BINDING_MAX_AGE_SECONDS: number;
|
|
19
|
+
/** A new binding: the cookie to give the browser, and the hash to keep server-side. */
|
|
20
|
+
export interface SigninBinding {
|
|
21
|
+
/** Cookie name, derived from the pending authorization id. */
|
|
22
|
+
cookieName: string;
|
|
23
|
+
/** Cookie value: 32 random bytes, base64url. Never stored server-side. */
|
|
24
|
+
value: string;
|
|
25
|
+
/** SHA-256 (hex) of `value`, kept on the pending authorization. */
|
|
26
|
+
hash: string;
|
|
27
|
+
}
|
|
28
|
+
/** The binding cookie's name for the pending authorization `pendingAuthId` (it doesn't carry the id itself). */
|
|
29
|
+
export declare function signinBindingCookieName(pendingAuthId: string, options?: SigninBindingCookieOptions): string;
|
|
30
|
+
/** Create the binding for a new pending authorization. */
|
|
31
|
+
export declare function createSigninBinding(pendingAuthId: string, options?: SigninBindingCookieOptions): SigninBinding;
|
|
32
|
+
/**
|
|
33
|
+
* Whether a request's `Cookie` header carries the binding of `pendingAuthId`
|
|
34
|
+
* whose hash is `expectedHash`, under the name `options` selects. Fails closed:
|
|
35
|
+
* no expected hash (a record created without a binding), no cookie, or a
|
|
36
|
+
* different value all return `false`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function signinBindingMatches(cookieHeader: string | undefined, pendingAuthId: string, expectedHash: string | undefined, options?: SigninBindingCookieOptions): boolean;
|
|
39
|
+
//# sourceMappingURL=signin-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signin-binding.d.ts","sourceRoot":"","sources":["../../src/session/signin-binding.ts"],"names":[],"mappings":"AAqBA,kGAAkG;AAClG,eAAO,MAAM,4BAA4B,qBAAqB,CAAC;AAE/D,sGAAsG;AACtG,eAAO,MAAM,mCAAmC,4BAA2C,CAAC;AAE5F,mFAAmF;AACnF,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B,QAAU,CAAC;AAEtD,uFAAuF;AACvF,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gHAAgH;AAChH,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,0BAA+B,GAAG,MAAM,CAG/G;AAED,0DAA0D;AAC1D,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,0BAA+B,GAAG,aAAa,CAGlH;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAQT"}
|
package/ui/base-layout.d.ts
CHANGED
|
@@ -36,6 +36,32 @@ export declare const CDN: {
|
|
|
36
36
|
readonly stylesheet: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Content-Security-Policy for the built-in authorization pages (sign-in,
|
|
41
|
+
* consent, provider selection, incremental authorization, errors).
|
|
42
|
+
*
|
|
43
|
+
* Scripts may come only from this server and the Tailwind CDN; the pages' own
|
|
44
|
+
* small inline handlers need `'unsafe-inline'` (every interpolated value is
|
|
45
|
+
* HTML-escaped). Styles and fonts are limited to Google Fonts, images to this
|
|
46
|
+
* server, `data:` and https (a client's `logo_uri`), and the pages can't be
|
|
47
|
+
* framed (clickjacking) or rebased.
|
|
48
|
+
*/
|
|
49
|
+
export declare const BUILT_IN_AUTH_PAGE_CSP: string;
|
|
50
|
+
/**
|
|
51
|
+
* Security headers for a built-in authorization page.
|
|
52
|
+
*
|
|
53
|
+
* `Referrer-Policy: same-origin` keeps the page's URL (client, redirect_uri,
|
|
54
|
+
* state) away from the CDNs it loads, while the page's own form POST still
|
|
55
|
+
* carries its `Origin`, which the callback checks; `no-referrer` would turn
|
|
56
|
+
* that into `Origin: null` and every sign-in would be refused as cross-origin.
|
|
57
|
+
*
|
|
58
|
+
* @param options.csp - `false` leaves out the Content-Security-Policy, for
|
|
59
|
+
* markup the server didn't write (a `login.render` override may load its own
|
|
60
|
+
* scripts); the anti-framing, sniffing, referrer and caching headers still apply.
|
|
61
|
+
*/
|
|
62
|
+
export declare function builtInAuthPageHeaders(options?: {
|
|
63
|
+
csp?: boolean;
|
|
64
|
+
}): Record<string, string>;
|
|
39
65
|
/**
|
|
40
66
|
* Theme color configuration
|
|
41
67
|
* Keys become CSS custom properties: --color-{key}
|
package/ui/base-layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-layout.d.ts","sourceRoot":"","sources":["../../src/ui/base-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH;;GAEG;AACH,eAAO,MAAM,GAAG;IACd,oFAAoF;;IAGpF,yCAAyC;;;;;CAKjC,CAAC;
|
|
1
|
+
{"version":3,"file":"base-layout.d.ts","sourceRoot":"","sources":["../../src/ui/base-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH;;GAEG;AACH,eAAO,MAAM,GAAG;IACd,oFAAoF;;IAGpF,yCAAyC;;;;;CAKjC,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,QAUvB,CAAC;AAEb;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ9F;AAMD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,CAAC,GAAG,EAAE,MAAM,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YAAY,CAC1B,cAAc,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACzC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,KAAK,MAAM,CAmBzD;AAMD;;GAEG;AACH,eAAO,MAAM,UAAU,YA5BV,MAAM,WAAW,iBAAiB,KAAK,MA8BlD,CAAC;AAEH;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAYtF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAS9E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CASnF"}
|
package/ui/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Server-side HTML templates for OAuth authorization flows.
|
|
5
5
|
*/
|
|
6
|
-
export { CDN, DEFAULT_THEME, baseLayout, createLayout, authLayout, centeredCardLayout, wideLayout, extraWideLayout, escapeHtml, } from './base-layout';
|
|
6
|
+
export { CDN, DEFAULT_THEME, baseLayout, createLayout, authLayout, centeredCardLayout, wideLayout, extraWideLayout, escapeHtml, BUILT_IN_AUTH_PAGE_CSP, builtInAuthPageHeaders, } from './base-layout';
|
|
7
7
|
export type { ThemeColors, ThemeFonts, ThemeConfig, BaseLayoutOptions } from './base-layout';
|
|
8
8
|
export { buildConsentPage, buildIncrementalAuthPage, buildFederatedLoginPage, buildToolConsentPage, buildLoginPage, buildConnectPage, buildConnectSuccessPage, buildErrorPage, renderToHtml, } from './templates';
|
|
9
9
|
export type { AppAuthCard, ProviderCard, ToolCard, LoginExtraField, ConsentHiddenField } from './templates';
|
|
10
|
-
export { renderLocalLoginPage, toLoginExtraFields } from './local-login.helper';
|
|
10
|
+
export { renderLocalLoginPage, toLoginExtraFields, withoutSecretFieldValues } from './local-login.helper';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,GAAG,EACH,aAAa,EACb,UAAU,EACV,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,GAAG,EACH,aAAa,EACb,UAAU,EACV,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,UAAU,EACV,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAG7F,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAG5G,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -16,6 +16,12 @@ import { type LoginExtraField } from './templates';
|
|
|
16
16
|
* ordered {@link LoginExtraField} array consumed by {@link buildLoginPage}.
|
|
17
17
|
*/
|
|
18
18
|
export declare function toLoginExtraFields(fields: LoginConfig['fields'] | undefined, values?: Record<string, string>): LoginExtraField[];
|
|
19
|
+
/**
|
|
20
|
+
* Drop the submitted values of `password` fields, so a re-rendered sign-in
|
|
21
|
+
* page never writes a typed secret back into its HTML (where it would sit in
|
|
22
|
+
* the page source, caches and any logging proxy).
|
|
23
|
+
*/
|
|
24
|
+
export declare function withoutSecretFieldValues(values: Record<string, string> | undefined, fields: LoginConfig['fields'] | undefined): Record<string, string> | undefined;
|
|
19
25
|
/**
|
|
20
26
|
* Render the local login page for the given config + context.
|
|
21
27
|
*
|
|
@@ -25,7 +31,8 @@ export declare function toLoginExtraFields(fields: LoginConfig['fields'] | undef
|
|
|
25
31
|
*
|
|
26
32
|
* @param login The `auth.login` config (may be undefined).
|
|
27
33
|
* @param ctx Render context (client identity, scopes, pendingAuthId, callbackPath, error).
|
|
28
|
-
* @param
|
|
34
|
+
* @param submitted Optional submitted values to pre-fill on re-render (after a failed
|
|
35
|
+
* authenticate()). Values of `password` fields are never written back.
|
|
29
36
|
*/
|
|
30
|
-
export declare function renderLocalLoginPage(login: LoginConfig | undefined, ctx: LoginRenderContext,
|
|
37
|
+
export declare function renderLocalLoginPage(login: LoginConfig | undefined, ctx: LoginRenderContext, submitted?: Record<string, string>): string;
|
|
31
38
|
//# sourceMappingURL=local-login.helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-login.helper.d.ts","sourceRoot":"","sources":["../../src/ui/local-login.helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnE;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,SAAS,EACzC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,eAAe,EAAE,CAWnB;AAED
|
|
1
|
+
{"version":3,"file":"local-login.helper.d.ts","sourceRoot":"","sources":["../../src/ui/local-login.helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnE;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,SAAS,EACzC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,eAAe,EAAE,CAWnB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC1C,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,SAAS,GACxC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAQpC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,WAAW,GAAG,SAAS,EAC9B,GAAG,EAAE,kBAAkB,EACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC,MAAM,CAwBR"}
|
package/ui/templates.d.ts
CHANGED
|
@@ -110,10 +110,11 @@ export interface ConsentHiddenField {
|
|
|
110
110
|
/**
|
|
111
111
|
* Build consent page for tool selection.
|
|
112
112
|
*
|
|
113
|
-
* The form
|
|
114
|
-
* `pending_auth_id`, the chosen `tools=` checkboxes, and any
|
|
115
|
-
* {@link ConsentHiddenField hidden context}
|
|
116
|
-
*
|
|
113
|
+
* The form POSTs back to `callbackPath` (`/oauth/callback`) carrying
|
|
114
|
+
* `pending_auth_id`, the `csrfToken`, the chosen `tools=` checkboxes, and any
|
|
115
|
+
* caller-supplied {@link ConsentHiddenField hidden context}. It never needs the
|
|
116
|
+
* sign-in fields: the verified sign-in stays on the server until consent is
|
|
117
|
+
* given. Honors the `auth.consent` config flags:
|
|
117
118
|
*
|
|
118
119
|
* - `groupByApp` — group tools under per-app cards (default) or render a flat list.
|
|
119
120
|
* - `showDescriptions`— show tool descriptions (default) or hide them.
|
package/ui/templates.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/ui/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,IAAI,cAAc,EAAmD,MAAM,eAAe,CAAC;AAM9G;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;;GA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AAgB,cAAc,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAsBrF;AAMD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEhF"}
|
package/utils/index.d.ts
CHANGED
|
@@ -6,4 +6,6 @@ export type { BearerErrorCode, WwwAuthenticateOptions } from './www-authenticate
|
|
|
6
6
|
export { validateAudience, createAudienceValidator, deriveExpectedAudience, AudienceValidator, } from './audience.validator';
|
|
7
7
|
export type { AudienceValidationResult, AudienceValidatorOptions } from './audience.validator';
|
|
8
8
|
export { deriveAuthorizationId } from './authorization-id.utils';
|
|
9
|
+
export { advertisedScopes, DEFAULT_ALLOWED_SCOPES, grantScopes } from './scope-grant.utils';
|
|
10
|
+
export { isLoopbackRedirectUri } from './redirect-uri.utils';
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
package/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAExF,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAE/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAExF,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAE/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redirect-URI helpers shared by the authorization server flows.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Whether a redirect_uri targets the loopback interface (localhost, 127.0.0.0/8,
|
|
6
|
+
* ::1) — the only hosts the default DCR guard accepts when no
|
|
7
|
+
* `dcr.allowedRedirectUris` allowlist is configured.
|
|
8
|
+
*
|
|
9
|
+
* SECURITY: parses with `URL` and matches on the real `hostname`, replacing the
|
|
10
|
+
* previous unanchored substring regex `^https?://(localhost|\d+\.\d+\.\d+\.\d+|127\.0\.0\.1)`
|
|
11
|
+
* which accepted attacker hosts such as `http://localhost.evil.com/cb`,
|
|
12
|
+
* `http://1.2.3.4.evil.com/cb`, and — via userinfo — `http://127.0.0.1@evil.com/cb`
|
|
13
|
+
* (whose real host is `evil.com`). Any userinfo component is rejected outright.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isLoopbackRedirectUri(uri: string): boolean;
|
|
16
|
+
//# sourceMappingURL=redirect-uri.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirect-uri.utils.d.ts","sourceRoot":"","sources":["../../src/utils/redirect-uri.utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAkB1D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** The scopes granted when `allowedScopes` is not configured: the standard OpenID Connect ones. */
|
|
2
|
+
export declare const DEFAULT_ALLOWED_SCOPES: readonly string[];
|
|
3
|
+
/**
|
|
4
|
+
* Keep the requested scopes that match an allowed entry (exact, or a `*` glob),
|
|
5
|
+
* in request order, without duplicates.
|
|
6
|
+
*
|
|
7
|
+
* @param requested The scopes the client asked for.
|
|
8
|
+
* @param allowed The configured allowlist; `undefined` means {@link DEFAULT_ALLOWED_SCOPES}.
|
|
9
|
+
*/
|
|
10
|
+
export declare function grantScopes(requested: readonly string[], allowed: readonly string[] | undefined): string[];
|
|
11
|
+
/**
|
|
12
|
+
* The scope values to advertise as `scopes_supported` (RFC 8414 §2, RFC 9728 §2)
|
|
13
|
+
* for a server that grants `allowed`: the literal entries, in order, without
|
|
14
|
+
* duplicates. A `*` glob such as `'tickets:*'` names no single scope a client
|
|
15
|
+
* could ask for, so it isn't advertised (RFC 8414 lets a server leave supported
|
|
16
|
+
* scopes out); list a scope literally to advertise it.
|
|
17
|
+
*
|
|
18
|
+
* @param allowed The configured allowlist; `undefined` means {@link DEFAULT_ALLOWED_SCOPES}.
|
|
19
|
+
*/
|
|
20
|
+
export declare function advertisedScopes(allowed: readonly string[] | undefined): string[];
|
|
21
|
+
//# sourceMappingURL=scope-grant.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-grant.utils.d.ts","sourceRoot":"","sources":["../../src/utils/scope-grant.utils.ts"],"names":[],"mappings":"AASA,mGAAmG;AACnG,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAKlD,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAQ1G;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAMjF"}
|