@cauthyhq/node 1.1.0 → 1.2.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/CHANGELOG.md +37 -0
- package/README.md +79 -24
- package/dist/{cauthy-Wy-YDGrM.d.ts → cauthy-C7gZ-pbv.d.ts} +64 -2
- package/dist/{cauthy-Bn-i7cKD.d.mts → cauthy-CCSSj3Lg.d.mts} +64 -2
- package/dist/express.d.mts +2 -1
- package/dist/express.d.ts +2 -1
- package/dist/fastify.d.mts +2 -1
- package/dist/fastify.d.ts +2 -1
- package/dist/hono.d.mts +2 -1
- package/dist/hono.d.ts +2 -1
- package/dist/identity-BTJ8NB_w.d.mts +27 -0
- package/dist/identity-BTJ8NB_w.d.ts +27 -0
- package/dist/index.d.mts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +688 -67
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +683 -67
- package/dist/index.mjs.map +1 -1
- package/dist/keys.js.map +1 -1
- package/dist/keys.mjs.map +1 -1
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.mjs.map +1 -1
- package/dist/next.d.mts +2 -1
- package/dist/next.d.ts +2 -1
- package/dist/testing.d.mts +36 -0
- package/dist/testing.d.ts +36 -0
- package/dist/testing.js +395 -0
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +395 -0
- package/dist/testing.mjs.map +1 -1
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
export { A as AttributeType, a as CatalogResource, C as Cauthy, b as CauthyApiError, c as CauthyConfigError, d as CauthyEvent, e as
|
|
1
|
+
export { A as AttributeType, a as CatalogResource, C as Cauthy, b as CauthyApiError, c as CauthyConfigError, d as CauthyEvent, e as CauthyKeyError, f as CauthyKeyReason, g as CauthyOptions, h as CauthyPact, i as CauthySystem, j as CauthyTokenError, k as CauthyUnavailableError, l as CauthyWebhookError, m as CheckOf, n as CheckQuestion, o as CheckResult, p as CheckRule, q as ConditionalPermission, r as ContractOptions, J as JsonValue, M as MountTarget, N as NewMember, O as Organization, s as OrganizationMember, t as OrganizationRef, P as PactItem, u as PactStatus, v as PermissionOf, w as Permitted, x as Policy, y as PolicyDefinition, z as PolicyPermission, B as PolicyRole, D as PublicSession, E as PushPolicyOptions, R as ReplayStore, F as Resolved, G as ResolvedContract, H as RoleOf, I as STANDARD_VARIABLES, S as Session, K as SessionOrganization, L as SessionStatus, Q as SessionUser, T as SystemKey, U as SystemOptions, V as SystemPolicy, W as TokenIdentity, X as TokenRefusal, Y as VerifyTokenOptions, Z as VerifyWebhookOptions, _ as can, $ as createCauthy, a0 as createSystem, a1 as createTokenVerifier, a2 as createVerifierFromEnv, a3 as definePolicy, a4 as failClosed, a5 as memoryReplayStore, a6 as policySource, a7 as pullCatalog, a8 as pullPolicy, a9 as pushCatalog, aa as pushPolicy, ab as readContract, ac as remoteKeys, ad as verifyToken, ae as verifyWebhook } from './cauthy-CCSSj3Lg.mjs';
|
|
2
|
+
export { I as Identity } from './identity-BTJ8NB_w.mjs';
|
|
2
3
|
export { K as KeyStore, P as PactKeys, S as StoredKey } from './keys-D5k0omTb.mjs';
|
|
3
4
|
export { CauthyTheme, ImportedTheme, PushThemeOptions, StackmythThemeOptions, StackmythTokens, ThemeFont, ThemeTexts, pushTheme, themeFromStackmyth, tokensFromStackmyth } from './theme.mjs';
|
|
4
5
|
import 'jose';
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* The variables CAUTHY_KEY replaces: set beside it, each is a second source
|
|
9
|
+
* of the same thing, and the application refuses to start (key/cauthy-key.md §10).
|
|
10
|
+
*/
|
|
11
|
+
declare const KEY_REPLACES: readonly ["CAUTHY_ISSUER", "CAUTHY_CLIENT_ID", "CAUTHY_CLIENT_SECRET", "CAUTHY_SYSTEM", "CAUTHY_TENANT", "CAUTHY_SYSTEM_KEY", "CAUTHY_SYSTEM_KEY_ID", "CAUTHY_BASE_URL", "CAUTHY_AUDIENCE", "CAUTHY_TENANT_ID"];
|
|
12
|
+
/** What a CAUTHY_KEY names. Never logged, never printed. */
|
|
13
|
+
interface CauthyKey {
|
|
14
|
+
/** Cauthy's origin, e.g. https://cauthy.api.example.com */
|
|
15
|
+
issuer: string;
|
|
16
|
+
clientId: string;
|
|
17
|
+
/** The 43-character secret segment: the HKDF input, as text. */
|
|
18
|
+
secret: string;
|
|
19
|
+
}
|
|
20
|
+
/** Reads a CAUTHY_KEY; throws CauthyKeyError with the reason, never the value. */
|
|
21
|
+
declare function parseKey(text: string): CauthyKey;
|
|
22
|
+
/** Writes a CAUTHY_KEY (what the dashboard does in the browser; here for tests and tools). */
|
|
23
|
+
declare function composeKey(issuer: string, clientId: string, secret: string): string;
|
|
24
|
+
|
|
6
25
|
interface ConnectOptions {
|
|
7
26
|
/** The system's name, as its organizations are filed under: lowercase, digits, - or _. */
|
|
8
27
|
system: string;
|
|
@@ -135,4 +154,4 @@ declare const PROTOCOL_VERSION = "1";
|
|
|
135
154
|
*/
|
|
136
155
|
type NextStep = 'done' | 'mfa' | 'verify_email' | 'code' | 'passkey' | 'one_tap' | 'redirect';
|
|
137
156
|
|
|
138
|
-
export { type AuthField, type ConnectOptions, type Connected, DEFAULT_PASSWORD_POLICY, type FieldProblem, MIN_PASSWORD, type NextStep, PROTOCOL_VERSION, type PasswordClass, type PasswordLocale, type PasswordPolicy, type PasswordReason, checkCode, checkEmail, checkName, checkNewPassword, checkPassword, connectSystem, describePasswordPolicy, explainPasswordProblems, passwordPolicyOf, passwordProblems };
|
|
157
|
+
export { type AuthField, type CauthyKey, type ConnectOptions, type Connected, DEFAULT_PASSWORD_POLICY, type FieldProblem, KEY_REPLACES, MIN_PASSWORD, type NextStep, PROTOCOL_VERSION, type PasswordClass, type PasswordLocale, type PasswordPolicy, type PasswordReason, checkCode, checkEmail, checkName, checkNewPassword, checkPassword, composeKey, connectSystem, describePasswordPolicy, explainPasswordProblems, parseKey, passwordPolicyOf, passwordProblems };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
export { A as AttributeType, a as CatalogResource, C as Cauthy, b as CauthyApiError, c as CauthyConfigError, d as CauthyEvent, e as
|
|
1
|
+
export { A as AttributeType, a as CatalogResource, C as Cauthy, b as CauthyApiError, c as CauthyConfigError, d as CauthyEvent, e as CauthyKeyError, f as CauthyKeyReason, g as CauthyOptions, h as CauthyPact, i as CauthySystem, j as CauthyTokenError, k as CauthyUnavailableError, l as CauthyWebhookError, m as CheckOf, n as CheckQuestion, o as CheckResult, p as CheckRule, q as ConditionalPermission, r as ContractOptions, J as JsonValue, M as MountTarget, N as NewMember, O as Organization, s as OrganizationMember, t as OrganizationRef, P as PactItem, u as PactStatus, v as PermissionOf, w as Permitted, x as Policy, y as PolicyDefinition, z as PolicyPermission, B as PolicyRole, D as PublicSession, E as PushPolicyOptions, R as ReplayStore, F as Resolved, G as ResolvedContract, H as RoleOf, I as STANDARD_VARIABLES, S as Session, K as SessionOrganization, L as SessionStatus, Q as SessionUser, T as SystemKey, U as SystemOptions, V as SystemPolicy, W as TokenIdentity, X as TokenRefusal, Y as VerifyTokenOptions, Z as VerifyWebhookOptions, _ as can, $ as createCauthy, a0 as createSystem, a1 as createTokenVerifier, a2 as createVerifierFromEnv, a3 as definePolicy, a4 as failClosed, a5 as memoryReplayStore, a6 as policySource, a7 as pullCatalog, a8 as pullPolicy, a9 as pushCatalog, aa as pushPolicy, ab as readContract, ac as remoteKeys, ad as verifyToken, ae as verifyWebhook } from './cauthy-C7gZ-pbv.js';
|
|
2
|
+
export { I as Identity } from './identity-BTJ8NB_w.js';
|
|
2
3
|
export { K as KeyStore, P as PactKeys, S as StoredKey } from './keys-D5k0omTb.js';
|
|
3
4
|
export { CauthyTheme, ImportedTheme, PushThemeOptions, StackmythThemeOptions, StackmythTokens, ThemeFont, ThemeTexts, pushTheme, themeFromStackmyth, tokensFromStackmyth } from './theme.js';
|
|
4
5
|
import 'jose';
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* The variables CAUTHY_KEY replaces: set beside it, each is a second source
|
|
9
|
+
* of the same thing, and the application refuses to start (key/cauthy-key.md §10).
|
|
10
|
+
*/
|
|
11
|
+
declare const KEY_REPLACES: readonly ["CAUTHY_ISSUER", "CAUTHY_CLIENT_ID", "CAUTHY_CLIENT_SECRET", "CAUTHY_SYSTEM", "CAUTHY_TENANT", "CAUTHY_SYSTEM_KEY", "CAUTHY_SYSTEM_KEY_ID", "CAUTHY_BASE_URL", "CAUTHY_AUDIENCE", "CAUTHY_TENANT_ID"];
|
|
12
|
+
/** What a CAUTHY_KEY names. Never logged, never printed. */
|
|
13
|
+
interface CauthyKey {
|
|
14
|
+
/** Cauthy's origin, e.g. https://cauthy.api.example.com */
|
|
15
|
+
issuer: string;
|
|
16
|
+
clientId: string;
|
|
17
|
+
/** The 43-character secret segment: the HKDF input, as text. */
|
|
18
|
+
secret: string;
|
|
19
|
+
}
|
|
20
|
+
/** Reads a CAUTHY_KEY; throws CauthyKeyError with the reason, never the value. */
|
|
21
|
+
declare function parseKey(text: string): CauthyKey;
|
|
22
|
+
/** Writes a CAUTHY_KEY (what the dashboard does in the browser; here for tests and tools). */
|
|
23
|
+
declare function composeKey(issuer: string, clientId: string, secret: string): string;
|
|
24
|
+
|
|
6
25
|
interface ConnectOptions {
|
|
7
26
|
/** The system's name, as its organizations are filed under: lowercase, digits, - or _. */
|
|
8
27
|
system: string;
|
|
@@ -135,4 +154,4 @@ declare const PROTOCOL_VERSION = "1";
|
|
|
135
154
|
*/
|
|
136
155
|
type NextStep = 'done' | 'mfa' | 'verify_email' | 'code' | 'passkey' | 'one_tap' | 'redirect';
|
|
137
156
|
|
|
138
|
-
export { type AuthField, type ConnectOptions, type Connected, DEFAULT_PASSWORD_POLICY, type FieldProblem, MIN_PASSWORD, type NextStep, PROTOCOL_VERSION, type PasswordClass, type PasswordLocale, type PasswordPolicy, type PasswordReason, checkCode, checkEmail, checkName, checkNewPassword, checkPassword, connectSystem, describePasswordPolicy, explainPasswordProblems, passwordPolicyOf, passwordProblems };
|
|
157
|
+
export { type AuthField, type CauthyKey, type ConnectOptions, type Connected, DEFAULT_PASSWORD_POLICY, type FieldProblem, KEY_REPLACES, MIN_PASSWORD, type NextStep, PROTOCOL_VERSION, type PasswordClass, type PasswordLocale, type PasswordPolicy, type PasswordReason, checkCode, checkEmail, checkName, checkNewPassword, checkPassword, composeKey, connectSystem, describePasswordPolicy, explainPasswordProblems, parseKey, passwordPolicyOf, passwordProblems };
|