@absolutejs/auth 0.54.6 → 0.54.8
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/agents/index.d.ts +1 -0
- package/dist/agents/index.js +209 -3
- package/dist/agents/index.js.map +7 -4
- package/dist/agents/oidcAdapter.d.ts +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +124 -9
- package/dist/index.js.map +9 -8
- package/dist/manifest.js +21 -2
- package/dist/manifest.js.map +3 -3
- package/dist/oidc/clientIdMetadata.d.ts +32 -0
- package/dist/oidc/config.d.ts +1 -0
- package/dist/oidc/dpop.d.ts +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { OAuthClient } from './types';
|
|
2
|
+
export type ClientIdMetadataDocument = {
|
|
3
|
+
client_id: string;
|
|
4
|
+
client_name?: string;
|
|
5
|
+
redirect_uris: string[];
|
|
6
|
+
grant_types?: string[];
|
|
7
|
+
response_types?: string[];
|
|
8
|
+
token_endpoint_auth_method?: 'none' | 'private_key_jwt' | 'self_signed_tls_client_auth';
|
|
9
|
+
application_type?: 'native' | 'web';
|
|
10
|
+
client_uri?: string;
|
|
11
|
+
logo_uri?: string;
|
|
12
|
+
policy_uri?: string;
|
|
13
|
+
tos_uri?: string;
|
|
14
|
+
jwks_uri?: string;
|
|
15
|
+
jwks?: {
|
|
16
|
+
keys: JsonWebKey[];
|
|
17
|
+
};
|
|
18
|
+
scope?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const validateClientIdMetadataDocument: (document: ClientIdMetadataDocument, expectedClientId: string) => string[];
|
|
21
|
+
export declare const clientIdMetadataToOAuthClient: (document: ClientIdMetadataDocument) => OAuthClient;
|
|
22
|
+
/** Resolve an HTTPS URL client_id into OAuth client metadata without prior
|
|
23
|
+
registration. Network access is injected so callers can enforce DNS/IP/redirect
|
|
24
|
+
policy with @absolutejs/egress. Redirects are forbidden and documents are capped
|
|
25
|
+
at 5 KiB per the IETF Client ID Metadata Document security guidance. */
|
|
26
|
+
export declare const createClientIdMetadataResolver: ({ fetch: fetcher, allow, cacheTtlMs, maxBytes, now }: {
|
|
27
|
+
fetch: (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
28
|
+
allow?: (clientId: string) => boolean | Promise<boolean>;
|
|
29
|
+
cacheTtlMs?: number;
|
|
30
|
+
maxBytes?: number;
|
|
31
|
+
now?: () => number;
|
|
32
|
+
}) => (clientId: string) => Promise<OAuthClient | undefined>;
|
package/dist/oidc/config.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type OidcProviderConfig<UserType> = {
|
|
|
13
13
|
clientAssertionJtiStore?: ClientAssertionJtiStore;
|
|
14
14
|
clientRegistrationTokenStore?: ClientRegistrationTokenStore;
|
|
15
15
|
clientStore: OAuthClientStore;
|
|
16
|
+
resolveClientIdMetadata?: (clientId: string) => Promise<OAuthClient | undefined>;
|
|
16
17
|
deviceAuthorizationStore?: DeviceAuthorizationStore;
|
|
17
18
|
deviceCodeTtlMs?: number;
|
|
18
19
|
devicePollIntervalSeconds?: number;
|
package/dist/oidc/dpop.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export type DpopResult = {
|
|
|
12
12
|
jkt: string;
|
|
13
13
|
jti?: string;
|
|
14
14
|
};
|
|
15
|
-
export declare const verifyDpopProof: ({ htm, htu, isUsedJti, maxAgeMs, now, proof }: {
|
|
15
|
+
export declare const verifyDpopProof: ({ accessToken, htm, htu, isUsedJti, maxAgeMs, now, proof }: {
|
|
16
|
+
accessToken?: string;
|
|
16
17
|
htm: string;
|
|
17
18
|
htu: string;
|
|
18
19
|
isUsedJti?: (jti: string) => boolean | Promise<boolean>;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.54.
|
|
2
|
+
"version": "0.54.8",
|
|
3
3
|
"name": "@absolutejs/auth",
|
|
4
4
|
"description": "An authorization library for absolutejs",
|
|
5
5
|
"repository": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@absolutejs/linked-providers": "0.0.2",
|
|
76
76
|
"@neondatabase/serverless": "1.0.0",
|
|
77
77
|
"citra": "0.29.7",
|
|
78
|
-
"@absolutejs/manifest": "^0.
|
|
78
|
+
"@absolutejs/manifest": "^0.2.0",
|
|
79
79
|
"@sinclair/typebox": "^0.34.0",
|
|
80
80
|
"drizzle-orm": "1.0.0-rc.3"
|
|
81
81
|
},
|