@aooth/auth 0.1.58 → 0.1.60
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/atscript-db.d.cts +1 -2
- package/dist/atscript-db.d.mts +1 -2
- package/dist/{auth-credential-C9xy4X_k.d.mts → auth-credential-C5DiSbb2.d.mts} +0 -1
- package/dist/{auth-credential-C5zD8b0J.d.cts → auth-credential-CU4vsKhu.d.cts} +0 -1
- package/dist/authz.d.cts +17 -4
- package/dist/authz.d.mts +17 -4
- package/dist/{dynamic-client-store-DEGFMiTK.d.mts → dynamic-client-store-BCAqzG0Y.d.mts} +1 -2
- package/dist/{dynamic-client-store-Cujxec8n.d.cts → dynamic-client-store-CafYRhI4.d.cts} +1 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -3
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +1 -1
- package/dist/redis.d.cts +1 -2
- package/dist/redis.d.mts +1 -2
- package/dist/{store-C6DU6VZk.d.cts → store-3YN2hfss.d.cts} +0 -1
- package/dist/{store-y7K7z1EF.d.mts → store-BUIC0iCK.d.mts} +0 -1
- package/package.json +8 -8
package/dist/atscript-db.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { c as CredentialSuccessorRef, r as CredentialStore, s as CredentialState, t as Clock } from "./clock-C0O0FCCN.cjs";
|
|
2
|
-
import { c as AuthCodeStore, d as NewAuthCode, h as PendingAuthorizationStore, m as PendingAuthorization, o as NewDynamicClient, p as NewPendingAuthorization, r as DynamicClientStore, s as AuthCode, t as DynamicClient } from "./dynamic-client-store-
|
|
3
|
-
|
|
2
|
+
import { c as AuthCodeStore, d as NewAuthCode, h as PendingAuthorizationStore, m as PendingAuthorization, o as NewDynamicClient, p as NewPendingAuthorization, r as DynamicClientStore, s as AuthCode, t as DynamicClient } from "./dynamic-client-store-CafYRhI4.cjs";
|
|
4
3
|
//#region src/atscript-db/authz-stores.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* atscript-db-backed durable implementations of the two short-lived
|
package/dist/atscript-db.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { c as CredentialSuccessorRef, r as CredentialStore, s as CredentialState, t as Clock } from "./clock-C0O0FCCN.mjs";
|
|
2
|
-
import { c as AuthCodeStore, d as NewAuthCode, h as PendingAuthorizationStore, m as PendingAuthorization, o as NewDynamicClient, p as NewPendingAuthorization, r as DynamicClientStore, s as AuthCode, t as DynamicClient } from "./dynamic-client-store-
|
|
3
|
-
|
|
2
|
+
import { c as AuthCodeStore, d as NewAuthCode, h as PendingAuthorizationStore, m as PendingAuthorization, o as NewDynamicClient, p as NewPendingAuthorization, r as DynamicClientStore, s as AuthCode, t as DynamicClient } from "./dynamic-client-store-BCAqzG0Y.mjs";
|
|
4
3
|
//#region src/atscript-db/authz-stores.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* atscript-db-backed durable implementations of the two short-lived
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { a as AuthContext, d as RefreshConfig, f as RefreshResult, i as DenylistStore, l as EnrichedSession, m as SessionInfo, o as CredentialMetadata, p as SessionEnricher, r as CredentialStore, s as CredentialState, t as Clock, u as IssueResult } from "./clock-C0O0FCCN.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/credential/auth-credential.d.ts
|
|
4
3
|
interface AuthCredentialOptions<TPayload extends object = object> {
|
|
5
4
|
/** Pluggable credential store (Memory, JWT, Encapsulated, ...). */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { a as AuthContext, d as RefreshConfig, f as RefreshResult, i as DenylistStore, l as EnrichedSession, m as SessionInfo, o as CredentialMetadata, p as SessionEnricher, r as CredentialStore, s as CredentialState, t as Clock, u as IssueResult } from "./clock-C0O0FCCN.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/credential/auth-credential.d.ts
|
|
4
3
|
interface AuthCredentialOptions<TPayload extends object = object> {
|
|
5
4
|
/** Pluggable credential store (Memory, JWT, Encapsulated, ...). */
|
package/dist/authz.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { t as Clock } from "./clock-C0O0FCCN.cjs";
|
|
2
|
-
import { _ as PendingAuthorizationStoreMemoryOptions, a as DynamicClientStoreMemoryOptions, b as tokenPolicyToIssueOptions, c as AuthCodeStore, d as NewAuthCode, f as DEFAULT_PENDING_TTL_MS, g as PendingAuthorizationStoreMemory, h as PendingAuthorizationStore, i as DynamicClientStoreMemory, l as AuthCodeStoreMemory, m as PendingAuthorization, n as DynamicClientAuthMethod, o as NewDynamicClient, p as NewPendingAuthorization, r as DynamicClientStore, s as AuthCode, t as DynamicClient, u as AuthCodeStoreMemoryOptions, v as DEFAULT_AUTHZ_REFRESH_TTL_MS, y as TokenPolicy } from "./dynamic-client-store-
|
|
2
|
+
import { _ as PendingAuthorizationStoreMemoryOptions, a as DynamicClientStoreMemoryOptions, b as tokenPolicyToIssueOptions, c as AuthCodeStore, d as NewAuthCode, f as DEFAULT_PENDING_TTL_MS, g as PendingAuthorizationStoreMemory, h as PendingAuthorizationStore, i as DynamicClientStoreMemory, l as AuthCodeStoreMemory, m as PendingAuthorization, n as DynamicClientAuthMethod, o as NewDynamicClient, p as NewPendingAuthorization, r as DynamicClientStore, s as AuthCode, t as DynamicClient, u as AuthCodeStoreMemoryOptions, v as DEFAULT_AUTHZ_REFRESH_TTL_MS, y as TokenPolicy } from "./dynamic-client-store-CafYRhI4.cjs";
|
|
3
3
|
import { JWK } from "jose";
|
|
4
|
-
|
|
5
4
|
//#region src/authz/authz-errors.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Failure taxonomy for the authorization-server endpoints (AUTH-SERVER.md §7).
|
|
@@ -10,12 +9,26 @@ import { JWK } from "jose";
|
|
|
10
9
|
* code. Messages are benign — they must not disclose whether a failure was an
|
|
11
10
|
* unknown client vs. a bad redirect vs. an expired code.
|
|
12
11
|
*/
|
|
13
|
-
type AuthorizeErrorCode =
|
|
12
|
+
type AuthorizeErrorCode =
|
|
13
|
+
/** Missing or malformed parameter at `/authorize` or `/token`. */
|
|
14
|
+
"invalid_request" |
|
|
15
|
+
/** `redirect_uri` is not an allowed (loopback / registered) target. */
|
|
16
|
+
"invalid_redirect" |
|
|
17
|
+
/** Code unknown / expired / already-redeemed, or PKCE verifier mismatch (`/token`). */
|
|
18
|
+
"invalid_grant" |
|
|
19
|
+
/** Unknown or unauthenticated client (Tier 2). */
|
|
20
|
+
"invalid_client" |
|
|
21
|
+
/** A known client used a grant/response it is not allowed (Tier 2). */
|
|
22
|
+
"unauthorized_client" |
|
|
14
23
|
/**
|
|
15
24
|
* RFC 8707: more than one `resource` value on a leg, or the `/token`
|
|
16
25
|
* `resource` differs from the one recorded at `/authorize`.
|
|
17
26
|
*/
|
|
18
|
-
|
|
27
|
+
"invalid_target" |
|
|
28
|
+
/** The user declined the authorization (consent). */
|
|
29
|
+
"access_denied" |
|
|
30
|
+
/** An unexpected server-side failure. */
|
|
31
|
+
"server_error";
|
|
19
32
|
/** A typed authorization-server failure. */
|
|
20
33
|
declare class AuthorizeError extends Error {
|
|
21
34
|
readonly code: AuthorizeErrorCode;
|
package/dist/authz.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { t as Clock } from "./clock-C0O0FCCN.mjs";
|
|
2
|
-
import { _ as PendingAuthorizationStoreMemoryOptions, a as DynamicClientStoreMemoryOptions, b as tokenPolicyToIssueOptions, c as AuthCodeStore, d as NewAuthCode, f as DEFAULT_PENDING_TTL_MS, g as PendingAuthorizationStoreMemory, h as PendingAuthorizationStore, i as DynamicClientStoreMemory, l as AuthCodeStoreMemory, m as PendingAuthorization, n as DynamicClientAuthMethod, o as NewDynamicClient, p as NewPendingAuthorization, r as DynamicClientStore, s as AuthCode, t as DynamicClient, u as AuthCodeStoreMemoryOptions, v as DEFAULT_AUTHZ_REFRESH_TTL_MS, y as TokenPolicy } from "./dynamic-client-store-
|
|
2
|
+
import { _ as PendingAuthorizationStoreMemoryOptions, a as DynamicClientStoreMemoryOptions, b as tokenPolicyToIssueOptions, c as AuthCodeStore, d as NewAuthCode, f as DEFAULT_PENDING_TTL_MS, g as PendingAuthorizationStoreMemory, h as PendingAuthorizationStore, i as DynamicClientStoreMemory, l as AuthCodeStoreMemory, m as PendingAuthorization, n as DynamicClientAuthMethod, o as NewDynamicClient, p as NewPendingAuthorization, r as DynamicClientStore, s as AuthCode, t as DynamicClient, u as AuthCodeStoreMemoryOptions, v as DEFAULT_AUTHZ_REFRESH_TTL_MS, y as TokenPolicy } from "./dynamic-client-store-BCAqzG0Y.mjs";
|
|
3
3
|
import { JWK } from "jose";
|
|
4
|
-
|
|
5
4
|
//#region src/authz/authz-errors.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Failure taxonomy for the authorization-server endpoints (AUTH-SERVER.md §7).
|
|
@@ -10,12 +9,26 @@ import { JWK } from "jose";
|
|
|
10
9
|
* code. Messages are benign — they must not disclose whether a failure was an
|
|
11
10
|
* unknown client vs. a bad redirect vs. an expired code.
|
|
12
11
|
*/
|
|
13
|
-
type AuthorizeErrorCode =
|
|
12
|
+
type AuthorizeErrorCode =
|
|
13
|
+
/** Missing or malformed parameter at `/authorize` or `/token`. */
|
|
14
|
+
"invalid_request" |
|
|
15
|
+
/** `redirect_uri` is not an allowed (loopback / registered) target. */
|
|
16
|
+
"invalid_redirect" |
|
|
17
|
+
/** Code unknown / expired / already-redeemed, or PKCE verifier mismatch (`/token`). */
|
|
18
|
+
"invalid_grant" |
|
|
19
|
+
/** Unknown or unauthenticated client (Tier 2). */
|
|
20
|
+
"invalid_client" |
|
|
21
|
+
/** A known client used a grant/response it is not allowed (Tier 2). */
|
|
22
|
+
"unauthorized_client" |
|
|
14
23
|
/**
|
|
15
24
|
* RFC 8707: more than one `resource` value on a leg, or the `/token`
|
|
16
25
|
* `resource` differs from the one recorded at `/authorize`.
|
|
17
26
|
*/
|
|
18
|
-
|
|
27
|
+
"invalid_target" |
|
|
28
|
+
/** The user declined the authorization (consent). */
|
|
29
|
+
"access_denied" |
|
|
30
|
+
/** An unexpected server-side failure. */
|
|
31
|
+
"server_error";
|
|
19
32
|
/** A typed authorization-server failure. */
|
|
20
33
|
declare class AuthorizeError extends Error {
|
|
21
34
|
readonly code: AuthorizeErrorCode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { t as Clock } from "./clock-C0O0FCCN.mjs";
|
|
2
|
-
import { r as IssueOptions } from "./auth-credential-
|
|
3
|
-
|
|
2
|
+
import { r as IssueOptions } from "./auth-credential-C5DiSbb2.mjs";
|
|
4
3
|
//#region src/authz/token-policy.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* What the authorization server mints for a completed grant — forwarded verbatim
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { t as Clock } from "./clock-C0O0FCCN.cjs";
|
|
2
|
-
import { r as IssueOptions } from "./auth-credential-
|
|
3
|
-
|
|
2
|
+
import { r as IssueOptions } from "./auth-credential-CU4vsKhu.cjs";
|
|
4
3
|
//#region src/authz/token-policy.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* What the authorization server mints for a completed grant — forwarded verbatim
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { a as AuthContext, d as RefreshConfig, f as RefreshResult, i as DenylistStore, l as EnrichedSession, m as SessionInfo, n as defaultClock, o as CredentialMetadata, p as SessionEnricher, r as CredentialStore, s as CredentialState, t as Clock, u as IssueResult } from "./clock-C0O0FCCN.cjs";
|
|
2
|
-
import { i as RefreshCallOptions, n as AuthCredentialOptions, r as IssueOptions, t as AuthCredential } from "./auth-credential-
|
|
3
|
-
import { n as RateLimitStoreMemory, t as RateLimitStore } from "./store-
|
|
2
|
+
import { i as RefreshCallOptions, n as AuthCredentialOptions, r as IssueOptions, t as AuthCredential } from "./auth-credential-CU4vsKhu.cjs";
|
|
3
|
+
import { n as RateLimitStoreMemory, t as RateLimitStore } from "./store-3YN2hfss.cjs";
|
|
4
4
|
import { CryptoKey } from "jose";
|
|
5
|
-
|
|
6
5
|
//#region src/errors.d.ts
|
|
7
6
|
type AuthErrorType = "INVALID_TOKEN" | "TOKEN_EXPIRED" | "TOKEN_REVOKED" | "REFRESH_REUSE_DETECTED" | "STATELESS_OPERATION_UNSUPPORTED" | "MAX_CONCURRENT_REACHED" | "INVALID_CONFIG";
|
|
8
7
|
declare class AuthError extends Error {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { a as AuthContext, d as RefreshConfig, f as RefreshResult, i as DenylistStore, l as EnrichedSession, m as SessionInfo, n as defaultClock, o as CredentialMetadata, p as SessionEnricher, r as CredentialStore, s as CredentialState, t as Clock, u as IssueResult } from "./clock-C0O0FCCN.mjs";
|
|
2
|
-
import { i as RefreshCallOptions, n as AuthCredentialOptions, r as IssueOptions, t as AuthCredential } from "./auth-credential-
|
|
3
|
-
import { n as RateLimitStoreMemory, t as RateLimitStore } from "./store-
|
|
2
|
+
import { i as RefreshCallOptions, n as AuthCredentialOptions, r as IssueOptions, t as AuthCredential } from "./auth-credential-C5DiSbb2.mjs";
|
|
3
|
+
import { n as RateLimitStoreMemory, t as RateLimitStore } from "./store-BUIC0iCK.mjs";
|
|
4
4
|
import { CryptoKey } from "jose";
|
|
5
|
-
|
|
6
5
|
//#region src/errors.d.ts
|
|
7
6
|
type AuthErrorType = "INVALID_TOKEN" | "TOKEN_EXPIRED" | "TOKEN_REVOKED" | "REFRESH_REUSE_DETECTED" | "STATELESS_OPERATION_UNSUPPORTED" | "MAX_CONCURRENT_REACHED" | "INVALID_CONFIG";
|
|
8
7
|
declare class AuthError extends Error {
|
package/dist/index.mjs
CHANGED
package/dist/redis.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { i as DenylistStore, r as CredentialStore, s as CredentialState } from "./clock-C0O0FCCN.cjs";
|
|
2
|
-
import { t as RateLimitStore } from "./store-
|
|
3
|
-
|
|
2
|
+
import { t as RateLimitStore } from "./store-3YN2hfss.cjs";
|
|
4
3
|
//#region src/redis/index.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Structural Redis client. Covers the exact set of commands used by
|
package/dist/redis.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { i as DenylistStore, r as CredentialStore, s as CredentialState } from "./clock-C0O0FCCN.mjs";
|
|
2
|
-
import { t as RateLimitStore } from "./store-
|
|
3
|
-
|
|
2
|
+
import { t as RateLimitStore } from "./store-BUIC0iCK.mjs";
|
|
4
3
|
//#region src/redis/index.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Structural Redis client. Covers the exact set of commands used by
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aooth/auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.60",
|
|
4
4
|
"description": "Auth method layer for aoothjs (sessions, tokens, password reset, MFA primitives)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aoothjs",
|
|
@@ -104,18 +104,18 @@
|
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"jose": "^6.2.3",
|
|
107
|
-
"@aooth/user": "0.1.
|
|
107
|
+
"@aooth/user": "0.1.60"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@atscript/core": "^0.1.
|
|
111
|
-
"@atscript/db": "^0.1.
|
|
112
|
-
"@atscript/db-sql-tools": "^0.1.
|
|
113
|
-
"@atscript/db-sqlite": "^0.1.
|
|
114
|
-
"@atscript/typescript": "^0.1.
|
|
110
|
+
"@atscript/core": "^0.1.88",
|
|
111
|
+
"@atscript/db": "^0.1.126",
|
|
112
|
+
"@atscript/db-sql-tools": "^0.1.126",
|
|
113
|
+
"@atscript/db-sqlite": "^0.1.126",
|
|
114
|
+
"@atscript/typescript": "^0.1.88",
|
|
115
115
|
"@types/better-sqlite3": "^7.6.13",
|
|
116
116
|
"better-sqlite3": "^12.6.2",
|
|
117
117
|
"ioredis": "^5.11.1",
|
|
118
|
-
"unplugin-atscript": "^0.1.
|
|
118
|
+
"unplugin-atscript": "^0.1.88"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"@atscript/db": ">=0.1.79"
|