authhero 9.6.4 → 9.8.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/assets/u/widget/index.esm.js +1 -1
- package/dist/authhero.cjs +138 -138
- package/dist/authhero.d.ts +499 -187
- package/dist/authhero.mjs +14867 -14543
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/common.d.ts +17 -1
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/helpers/revoke-user-refresh-tokens.d.ts +21 -0
- package/dist/types/helpers/signing-keys.d.ts +11 -0
- package/dist/types/index.d.ts +489 -187
- package/dist/types/routes/auth-api/index.d.ts +21 -21
- package/dist/types/routes/auth-api/passwordless.d.ts +14 -14
- package/dist/types/routes/auth-api/revoke.d.ts +6 -6
- package/dist/types/routes/auth-api/well-known.d.ts +1 -1
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/connections.d.ts +1 -1
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/forms.d.ts +126 -126
- package/dist/types/routes/management-api/index.d.ts +463 -161
- package/dist/types/routes/management-api/keys.d.ts +86 -4
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/organizations.d.ts +7 -7
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/refresh_tokens.d.ts +7 -0
- package/dist/types/routes/management-api/roles.d.ts +1 -1
- package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
- package/dist/types/routes/management-api/tenants.d.ts +4 -4
- package/dist/types/routes/management-api/users.d.ts +148 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
- package/dist/types/utils/encryption.d.ts +51 -0
- package/dist/types/utils/jwks.d.ts +2 -2
- package/dist/types/utils/user-id.d.ts +19 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthorizationResponseType, AuthParams, LoginSession, RefreshToken, User, TokenResponse } from "@authhero/adapter-interfaces";
|
|
1
|
+
import { AuthorizationResponseType, AuthParams, LoginSession, LoginSessionAuthStrategy, RefreshToken, User, TokenResponse } from "@authhero/adapter-interfaces";
|
|
2
2
|
import { EnrichedClient } from "../helpers/client";
|
|
3
3
|
import { Context } from "hono";
|
|
4
4
|
import { Bindings, Variables } from "../types";
|
|
@@ -82,6 +82,22 @@ export interface CreateRefreshTokenParams {
|
|
|
82
82
|
login_id: string;
|
|
83
83
|
scope: string;
|
|
84
84
|
audience?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The authenticated session this token is issued under — Auth0's
|
|
87
|
+
* `session_id`. Stored so revoking a session can revoke its tokens in one
|
|
88
|
+
* hop, and so the refresh grant never has to resolve it through the
|
|
89
|
+
* short-lived login session. Optional: flows without a session still mint
|
|
90
|
+
* tokens, and the column is nullable for exactly that reason.
|
|
91
|
+
*/
|
|
92
|
+
session_id?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Auth-event facts, denormalised from the login session. All are immutable
|
|
95
|
+
* for the life of the token; keeping them here means the grant no longer
|
|
96
|
+
* degrades silently when the login session has been cleaned up.
|
|
97
|
+
*/
|
|
98
|
+
organization?: string;
|
|
99
|
+
auth_connection?: string;
|
|
100
|
+
auth_strategy?: LoginSessionAuthStrategy;
|
|
85
101
|
}
|
|
86
102
|
export interface CreatedRefreshToken {
|
|
87
103
|
row: RefreshToken;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const USERNAME_PASSWORD_PROVIDER = "auth0";
|
|
2
|
+
export declare const JWT_CERT_VALIDITY_DAYS = 365;
|
|
3
|
+
export declare const SAML_CERT_VALIDITY_DAYS: number;
|
|
2
4
|
export declare const JWKS_CACHE_TIMEOUT_IN_SECONDS: number;
|
|
3
5
|
export declare const SILENT_AUTH_MAX_AGE_IN_SECONDS: number;
|
|
4
6
|
export declare const UNIVERSAL_AUTH_SESSION_EXPIRES_IN_SECONDS: number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Context } from "hono";
|
|
2
|
+
import { Bindings, Variables } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Soft-revoke every active refresh token belonging to a user.
|
|
5
|
+
*
|
|
6
|
+
* Unlike the single-token admin delete (which also hard-removes the row), this
|
|
7
|
+
* keeps the rows around with `revoked_at` set so the admin UI and the audit
|
|
8
|
+
* trail can still show what was invalidated and when.
|
|
9
|
+
*
|
|
10
|
+
* Delegates to the adapter so the match is a pair of exact predicates rather
|
|
11
|
+
* than a `q` filter: the Lucene grammar splits on ` OR ` before tokenizing, so
|
|
12
|
+
* a user id containing ` OR user_id:<other> OR ` would widen a `q`-based
|
|
13
|
+
* revoke to another user's tokens. The adapter also skips already-revoked
|
|
14
|
+
* rows, so a concurrent revocation cannot overwrite an existing timestamp.
|
|
15
|
+
*
|
|
16
|
+
* Returns the number of tokens revoked.
|
|
17
|
+
*/
|
|
18
|
+
export declare function revokeUserRefreshTokens(ctx: Context<{
|
|
19
|
+
Bindings: Bindings;
|
|
20
|
+
Variables: Variables;
|
|
21
|
+
}>, tenant_id: string, user_id: string): Promise<number>;
|
|
@@ -17,6 +17,17 @@ export interface ResolveSigningKeysOptions {
|
|
|
17
17
|
export declare function resolveSigningKeys(keys: KeysAdapter, tenantId: string, modeOption: SigningKeyModeOption | undefined, opts: ResolveSigningKeysOptions): Promise<SigningKey[]>;
|
|
18
18
|
/** A key is signable only if it carries private material, not just a cert. */
|
|
19
19
|
export declare function isSignable(key: SigningKey): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A key with `current_since` in the future is *staged*: published so relying
|
|
22
|
+
* parties can pre-trust it, but not yet signing anything.
|
|
23
|
+
*
|
|
24
|
+
* This is what makes a zero-downtime rotation possible for a SAML service
|
|
25
|
+
* provider that pins the certificate out-of-band. The new certificate appears
|
|
26
|
+
* in the IdP metadata immediately, the operator gets it to the service
|
|
27
|
+
* provider, and only then does it start signing — the reverse order breaks
|
|
28
|
+
* every login in between.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isStaged(key: SigningKey, now?: Date): boolean;
|
|
20
31
|
export interface EnsureSigningKeyOptions {
|
|
21
32
|
/**
|
|
22
33
|
* When set, the key is created tenant-scoped (`tenant_id` stamped) and the
|