@openid4vc/oauth2 0.3.0-alpha-20251029091020 → 0.3.0-alpha-20251029102217

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.mts CHANGED
@@ -2310,7 +2310,7 @@ declare class Oauth2AuthorizationServer {
2310
2310
  [x: string]: unknown;
2311
2311
  iat: number;
2312
2312
  htu: string;
2313
- htm: "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "OPTIONS" | "TRACE" | "CONNECT" | "PATCH";
2313
+ htm: "POST" | "GET" | "PUT" | "DELETE" | "HEAD" | "OPTIONS" | "TRACE" | "CONNECT" | "PATCH";
2314
2314
  jti: string;
2315
2315
  ath?: string | undefined;
2316
2316
  iss?: string | undefined;
@@ -2608,11 +2608,20 @@ interface SendAuthorizationChallengeRequestOptions {
2608
2608
  * Scope to request for the authorization challenge request
2609
2609
  */
2610
2610
  scope?: string;
2611
+ /**
2612
+ * State for the authorization challenge request
2613
+ */
2614
+ state?: string;
2611
2615
  /**
2612
2616
  * The resource to which access is being requested. This can help the authorization
2613
2617
  * server in determining the resource server to handle the authorization request for
2614
2618
  */
2615
2619
  resource?: string;
2620
+ /**
2621
+ * Redirect uri to include in the authorization challenge request. Maybe be used by the
2622
+ * server when falling back to a PAR request.
2623
+ */
2624
+ redirectUri?: string;
2616
2625
  /**
2617
2626
  * Presentation during issuance session if credentials were presented
2618
2627
  * as part of an issuance session
package/dist/index.d.ts CHANGED
@@ -2310,7 +2310,7 @@ declare class Oauth2AuthorizationServer {
2310
2310
  [x: string]: unknown;
2311
2311
  iat: number;
2312
2312
  htu: string;
2313
- htm: "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "OPTIONS" | "TRACE" | "CONNECT" | "PATCH";
2313
+ htm: "POST" | "GET" | "PUT" | "DELETE" | "HEAD" | "OPTIONS" | "TRACE" | "CONNECT" | "PATCH";
2314
2314
  jti: string;
2315
2315
  ath?: string | undefined;
2316
2316
  iss?: string | undefined;
@@ -2608,11 +2608,20 @@ interface SendAuthorizationChallengeRequestOptions {
2608
2608
  * Scope to request for the authorization challenge request
2609
2609
  */
2610
2610
  scope?: string;
2611
+ /**
2612
+ * State for the authorization challenge request
2613
+ */
2614
+ state?: string;
2611
2615
  /**
2612
2616
  * The resource to which access is being requested. This can help the authorization
2613
2617
  * server in determining the resource server to handle the authorization request for
2614
2618
  */
2615
2619
  resource?: string;
2620
+ /**
2621
+ * Redirect uri to include in the authorization challenge request. Maybe be used by the
2622
+ * server when falling back to a PAR request.
2623
+ */
2624
+ redirectUri?: string;
2616
2625
  /**
2617
2626
  * Presentation during issuance session if credentials were presented
2618
2627
  * as part of an issuance session
package/dist/index.js CHANGED
@@ -1977,7 +1977,9 @@ async function sendAuthorizationChallengeRequest(options) {
1977
1977
  ...options.additionalRequestPayload,
1978
1978
  auth_session: options.authSession,
1979
1979
  scope: options.scope,
1980
+ redirect_uri: options.redirectUri,
1980
1981
  resource: options.resource,
1982
+ state: options.state,
1981
1983
  code_challenge: pkce?.codeChallenge,
1982
1984
  code_challenge_method: pkce?.codeChallengeMethod,
1983
1985
  presentation_during_issuance_session: options.presentationDuringIssuanceSession
@@ -2228,9 +2230,11 @@ var Oauth2Client = class {
2228
2230
  authorizationServerMetadata: options.authorizationServerMetadata,
2229
2231
  additionalRequestPayload: options.additionalRequestPayload,
2230
2232
  pkceCodeVerifier: pkce?.codeVerifier,
2233
+ redirectUri: options.redirectUri,
2231
2234
  scope: options.scope,
2232
2235
  resource: options.resource,
2233
- dpop: options.dpop
2236
+ dpop: options.dpop,
2237
+ state: options.state
2234
2238
  });
2235
2239
  } catch (error) {
2236
2240
  if (!(error instanceof Oauth2ClientAuthorizationChallengeError && error.errorResponse.error === Oauth2ErrorCodes.RedirectToWeb)) throw error;
@@ -2258,7 +2262,8 @@ var Oauth2Client = class {
2258
2262
  scope: options.scope,
2259
2263
  pkceCodeVerifier: pkce?.codeVerifier,
2260
2264
  resource: options.resource,
2261
- dpop: options.dpop
2265
+ dpop: options.dpop,
2266
+ state: options.state
2262
2267
  });
2263
2268
  }
2264
2269
  sendAuthorizationChallengeRequest(options) {