@absolutejs/auth 0.75.1 → 0.75.2

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.
@@ -25,6 +25,9 @@ export type AgentAuthConfig = {
25
25
  oauthGuide?: AgentOAuthGuideConfig;
26
26
  authorizationServer: string;
27
27
  delegationStore: AgentDelegationStore;
28
+ /** Advertise RFC 9728 `dpop_bound_access_tokens_required`. Keep this aligned
29
+ * with a credential verifier configured with `requireDpop: true`. */
30
+ dpopBoundAccessTokensRequired?: boolean;
28
31
  logoUri?: string;
29
32
  metadataRoute?: RouteString;
30
33
  /** Authorization-server route prefix. Defaults to `/oauth2`; used to derive
@@ -39,11 +42,12 @@ export type AgentAuthConfig = {
39
42
  scopes: string[];
40
43
  verifyCredential: AgentCredentialVerifier;
41
44
  };
42
- export declare const agentProtectedResourceMetadata: (config: Pick<AgentAuthConfig, "authorizationServer" | "logoUri" | "resource" | "resourceName" | "scopes">) => {
45
+ export declare const agentProtectedResourceMetadata: (config: Pick<AgentAuthConfig, "authorizationServer" | "dpopBoundAccessTokensRequired" | "logoUri" | "resource" | "resourceName" | "scopes">) => {
43
46
  resource: string;
44
47
  scopes_supported: string[];
45
48
  resource_name?: string | undefined;
46
49
  resource_logo_uri?: string | undefined;
50
+ dpop_bound_access_tokens_required?: boolean | undefined;
47
51
  authorization_servers: string[];
48
52
  bearer_methods_supported: string[];
49
53
  };
@@ -186,6 +186,7 @@ var DEFAULT_AGENT_RESOURCE_METADATA_ROUTE = "/.well-known/oauth-protected-resour
186
186
  var agentProtectedResourceMetadata = (config) => ({
187
187
  authorization_servers: [config.authorizationServer],
188
188
  bearer_methods_supported: ["header"],
189
+ ...config.dpopBoundAccessTokensRequired === true ? { dpop_bound_access_tokens_required: true } : {},
189
190
  ...config.logoUri === undefined ? {} : { resource_logo_uri: config.logoUri },
190
191
  ...config.resourceName === undefined ? {} : { resource_name: config.resourceName },
191
192
  resource: config.resource,
@@ -13798,5 +13799,5 @@ export {
13798
13799
  AGENT_CLAIM_GRANT_TYPE
13799
13800
  };
13800
13801
 
13801
- //# debugId=801AFAC38E904B9A64756E2164756E21
13802
+ //# debugId=16DE04B83F43B7D264756E2164756E21
13802
13803
  //# sourceMappingURL=index.js.map