authhero 5.12.0 → 5.13.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.
- package/dist/authhero.cjs +129 -129
- package/dist/authhero.d.ts +115 -79
- package/dist/authhero.mjs +9852 -9643
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/adapters/createEncryptedDataAdapter.d.ts +14 -0
- package/dist/types/adapters/index.d.ts +2 -0
- package/dist/types/authentication-flows/passwordless.d.ts +3 -3
- package/dist/types/helpers/custom-domain.d.ts +8 -0
- package/dist/types/helpers/service-token.d.ts +11 -1
- package/dist/types/index.d.ts +78 -78
- package/dist/types/routes/auth-api/index.d.ts +22 -22
- 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/management-api/action-executions.d.ts +2 -2
- package/dist/types/routes/management-api/actions.d.ts +1 -1
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/client-grants.d.ts +8 -8
- package/dist/types/routes/management-api/clients.d.ts +6 -6
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/email-templates.d.ts +14 -14
- package/dist/types/routes/management-api/failed-events.d.ts +1 -1
- package/dist/types/routes/management-api/forms.d.ts +119 -119
- package/dist/types/routes/management-api/index.d.ts +53 -53
- package/dist/types/routes/management-api/logs.d.ts +3 -3
- package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
- package/dist/types/routes/management-api/organizations.d.ts +2 -2
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +2 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +3 -3
- package/dist/types/routes/universal-login/u2-routes.d.ts +3 -3
- package/dist/types/types/Bindings.d.ts +1 -0
- package/dist/types/utils/field-encryption.d.ts +21 -0
- package/package.json +3 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataAdapters } from "@authhero/adapter-interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* Wraps a DataAdapters instance so that sensitive credential fields are
|
|
4
|
+
* transparently encrypted on write and decrypted on read. Only the adapters
|
|
5
|
+
* that hold secrets are wrapped; everything else passes through unchanged.
|
|
6
|
+
*
|
|
7
|
+
* Encrypted columns: clients.client_secret, connections.options
|
|
8
|
+
* (client_secret/app_secret/twilio_token/configuration.client_secret),
|
|
9
|
+
* email_providers.credentials, authentication_methods.totp_secret,
|
|
10
|
+
* migration_sources.credentials.client_secret.
|
|
11
|
+
*
|
|
12
|
+
* Private keys (keys.pkcs7, dkim_private_key) are intentionally NOT covered.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createEncryptedDataAdapter(data: DataAdapters, key: CryptoKey): DataAdapters;
|
|
@@ -446,7 +446,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
446
446
|
custom_login_page_preview?: string | undefined;
|
|
447
447
|
form_template?: string | undefined;
|
|
448
448
|
addons?: Record<string, any> | undefined;
|
|
449
|
-
token_endpoint_auth_method?: "
|
|
449
|
+
token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
|
|
450
450
|
client_metadata?: Record<string, string> | undefined;
|
|
451
451
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
452
452
|
mobile?: Record<string, any> | undefined;
|
|
@@ -529,8 +529,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
529
529
|
} | undefined;
|
|
530
530
|
authenticated_at?: string | undefined;
|
|
531
531
|
};
|
|
532
|
-
connectionType: "email" | "
|
|
533
|
-
authConnection: "email" | "
|
|
532
|
+
connectionType: "email" | "sms" | "username";
|
|
533
|
+
authConnection: "email" | "sms" | "username";
|
|
534
534
|
session_id: string | undefined;
|
|
535
535
|
authParams: {
|
|
536
536
|
client_id: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Bindings } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the hostname of a tenant's usable custom domain, if one exists.
|
|
4
|
+
*
|
|
5
|
+
* Only domains whose verification has completed ("ready") can serve traffic,
|
|
6
|
+
* so others are ignored. A primary domain wins over a non-primary one.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getTenantCustomDomain(env: Bindings, tenantId: string): Promise<string | undefined>;
|
|
@@ -58,6 +58,16 @@ export interface CreateClientServiceTokenParams {
|
|
|
58
58
|
expiresInSeconds?: number;
|
|
59
59
|
customClaims?: Record<string, unknown>;
|
|
60
60
|
}
|
|
61
|
+
export interface CreateClientServiceTokenOptions {
|
|
62
|
+
/**
|
|
63
|
+
* When the client isn't found in the request tenant, resolve it against the
|
|
64
|
+
* configured control-plane tenant and mint there instead. Off by default so
|
|
65
|
+
* that the hook-facing token API (`createTokenAPI`) cannot reach across the
|
|
66
|
+
* tenant boundary into control-plane clients — only trusted internal callers
|
|
67
|
+
* (e.g. the auth service's own email/SMS senders) opt in.
|
|
68
|
+
*/
|
|
69
|
+
allowControlPlaneFallback?: boolean;
|
|
70
|
+
}
|
|
61
71
|
/**
|
|
62
72
|
* In-process mint of a grant-bounded access token for a DB-registered M2M
|
|
63
73
|
* client. The caller is trusted (running inside the Worker) so no client
|
|
@@ -71,5 +81,5 @@ export interface CreateClientServiceTokenParams {
|
|
|
71
81
|
export declare function createClientServiceToken(ctx: Context<{
|
|
72
82
|
Bindings: Bindings;
|
|
73
83
|
Variables: Variables;
|
|
74
|
-
}>, tenantId: string, params: CreateClientServiceTokenParams): Promise<ServiceTokenResponse>;
|
|
84
|
+
}>, tenantId: string, params: CreateClientServiceTokenParams, options?: CreateClientServiceTokenOptions): Promise<ServiceTokenResponse>;
|
|
75
85
|
export { AUTH_SERVICE_CLIENT_ID };
|