@absolutejs/auth 0.36.0-beta.0 → 0.36.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/index.d.ts +1 -0
- package/dist/index.js +126 -22
- package/dist/index.js.map +7 -6
- package/dist/oidc/config.d.ts +5 -2
- package/dist/oidc/mtls.d.ts +11 -0
- package/dist/oidc/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/oidc/config.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export type OidcProviderConfig<UserType> = {
|
|
|
51
51
|
dpopNonce?: {
|
|
52
52
|
secret: string;
|
|
53
53
|
};
|
|
54
|
+
extractTlsClientCert?: (headers: Headers) => Promise<Uint8Array | undefined> | Uint8Array | undefined;
|
|
54
55
|
getAcr?: (context: {
|
|
55
56
|
scopes: string[];
|
|
56
57
|
user: UserType;
|
|
@@ -84,9 +85,10 @@ export declare const exchangeToken: <UserType>({ actorClientId, audience, config
|
|
|
84
85
|
requestedScopes?: string[];
|
|
85
86
|
subjectToken: string;
|
|
86
87
|
}) => Promise<TokenExchangeResult>;
|
|
87
|
-
export declare const issueTokenSet: <UserType>({ acr, claims, clientId, config, dpopJkt, nonce, now, scopes, sub }: {
|
|
88
|
+
export declare const issueTokenSet: <UserType>({ acr, claims, clientCertThumbprint, clientId, config, dpopJkt, nonce, now, scopes, sub }: {
|
|
88
89
|
acr?: string;
|
|
89
90
|
claims?: Record<string, unknown>;
|
|
91
|
+
clientCertThumbprint?: string;
|
|
90
92
|
clientId: string;
|
|
91
93
|
config: OidcProviderConfig<UserType>;
|
|
92
94
|
dpopJkt?: string;
|
|
@@ -246,8 +248,9 @@ export type BackchannelExchangeResult = {
|
|
|
246
248
|
error: BackchannelExchangeError;
|
|
247
249
|
ok: false;
|
|
248
250
|
};
|
|
249
|
-
export declare const exchangeBackchannelAuth: <UserType>({ authReqId, clientId, config, dpopJkt, now }: {
|
|
251
|
+
export declare const exchangeBackchannelAuth: <UserType>({ authReqId, clientCertThumbprint, clientId, config, dpopJkt, now }: {
|
|
250
252
|
authReqId: string;
|
|
253
|
+
clientCertThumbprint?: string;
|
|
251
254
|
clientId: string;
|
|
252
255
|
config: OidcProviderConfig<UserType>;
|
|
253
256
|
dpopJkt?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const computeCertThumbprint: (derBytes: Uint8Array) => Promise<string>;
|
|
2
|
+
export declare const extractRfc9440ClientCert: (headers: Headers) => Uint8Array<ArrayBuffer> | undefined;
|
|
3
|
+
export declare const resolveClientCert: ({ extract, headers }: {
|
|
4
|
+
extract: ((headers: Headers) => Promise<Uint8Array | undefined> | Uint8Array | undefined) | undefined;
|
|
5
|
+
headers: Headers;
|
|
6
|
+
}) => Promise<Uint8Array<ArrayBufferLike> | undefined>;
|
|
7
|
+
export declare const verifyCertificateBoundToken: ({ cnfThumbprint, extract, headers }: {
|
|
8
|
+
cnfThumbprint: string | undefined;
|
|
9
|
+
extract: ((headers: Headers) => Promise<Uint8Array | undefined> | Uint8Array | undefined) | undefined;
|
|
10
|
+
headers: Headers;
|
|
11
|
+
}) => Promise<boolean>;
|
package/dist/oidc/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export type OAuthClient = {
|
|
|
10
10
|
requirePushedAuthorizationRequests?: boolean;
|
|
11
11
|
requireSignedRequestObject?: boolean;
|
|
12
12
|
scopes: string[];
|
|
13
|
+
tlsCertificateBoundThumbprints?: string[];
|
|
13
14
|
};
|
|
14
15
|
export type ClientAssertionJtiStore = {
|
|
15
16
|
recordIfFresh: (clientId: string, jti: string, expiresAt: number) => Promise<boolean>;
|
package/package.json
CHANGED