@wix/redirects 1.0.8 → 1.0.10

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.
@@ -217,49 +217,56 @@ export interface RedirectSessionAuthorizeParams {
217
217
  * the authorization process.
218
218
  */
219
219
  export interface AuthorizeRequest {
220
- /** client_id is the unique identifier of the client application. */
220
+ /** ID of the Wix OAuth app requesting authorization. */
221
221
  clientId?: string;
222
222
  /**
223
- * response_type specifies the desired authorization grant type.
224
- * This can be "code" for the authorization code.
223
+ * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
224
+ *
225
+ * Supported values:
226
+ * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
225
227
  */
226
228
  responseType?: string;
229
+ /** URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not. */
230
+ redirectUri?: string | null;
227
231
  /**
228
- * redirect_uri is the URI to which the authorization server will redirect the
229
- * user-agent after the user grants/denies permission.
230
- */
231
- redirectUri?: string;
232
- /**
233
- * scope is a space-delimited string that specifies the requested scope of the
234
- * access request.
232
+ * Desired scope of access. If this field is left empty, only an access token is granted.
233
+ * To received a refresh token, pass `offline_access` as the value of this field.
235
234
  */
236
235
  scope?: string | null;
237
236
  /**
238
- * An opaque value, used for security purposes. If this request parameter is set
239
- * in the request, then it is returned to the application as part of the redirect_uri.
237
+ * A value used to confirm the state of an application before and after it makes an authorization
238
+ * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
239
+ * is redirected there.
240
+ * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
240
241
  */
241
242
  state?: string;
242
- /** (Optional) How the result of the authorization request is formatted */
243
+ /**
244
+ * esired response format.
245
+ *
246
+ * Supported values:
247
+ * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
248
+ * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
249
+ * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).
250
+ *
251
+ * Default value: `query`
252
+ */
243
253
  responseMode?: string | null;
244
254
  /**
245
- * code_challenge is the code challenge sent by the client as part of the PKCE
246
- * process. This field is only used if response_type is "code".
255
+ * Code challenge to use for PKCE verification.
256
+ * This field is only used if `responseType` is set to `code`.
247
257
  */
248
258
  codeChallenge?: string | null;
249
259
  /**
250
- * code_challenge_method is the code challenge method sent by the client as part
251
- * of the PKCE process. This field is only used if response_type is "code".
260
+ * Code challenge method to use for PKCE verification.
261
+ * This field is only used if `responseType` is set to `code`.
262
+ *
263
+ * Supported values:
264
+ * + `S256`: The code challenge is transformed using SHA-256 encyption.
265
+ * + `S512`: The code challenge is transformed using SHA-512 encyption.
252
266
  */
253
267
  codeChallengeMethod?: string | null;
254
- /** Current client session */
268
+ /** Session token of the site visitor to authorize. */
255
269
  sessionToken?: string | null;
256
- /**
257
- * Optional fields for errors
258
- * A short error code that describes the type of error that occurred (e.g. "invalid_request")
259
- */
260
- error?: string | null;
261
- /** A human-readable description of the error that occurred */
262
- errorDescription?: string | null;
263
270
  }
264
271
  export interface RedirectSessionLogoutParams {
265
272
  /** *Required.** ID of the OAuth app authorizing the client. */
@@ -1 +1 @@
1
- {"version":3,"file":"headless-v1-redirect-session.types.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.types.ts"],"names":[],"mappings":";;;AA6KA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAyHD,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAXW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAWhC;AAwED,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QASvB"}
1
+ {"version":3,"file":"headless-v1-redirect-session.types.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.types.ts"],"names":[],"mappings":";;;AA6KA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAgID,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAXW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAWhC;AAwED,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QASvB"}
@@ -223,49 +223,56 @@ export interface RedirectSessionAuthorizeParams {
223
223
  * the authorization process.
224
224
  */
225
225
  export interface AuthorizeRequest {
226
- /** client_id is the unique identifier of the client application. */
226
+ /** ID of the Wix OAuth app requesting authorization. */
227
227
  clientId?: string;
228
228
  /**
229
- * response_type specifies the desired authorization grant type.
230
- * This can be "code" for the authorization code.
229
+ * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
230
+ *
231
+ * Supported values:
232
+ * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
231
233
  */
232
234
  responseType?: string;
235
+ /** URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not. */
236
+ redirectUri?: string | null;
233
237
  /**
234
- * redirect_uri is the URI to which the authorization server will redirect the
235
- * user-agent after the user grants/denies permission.
236
- */
237
- redirectUri?: string;
238
- /**
239
- * scope is a space-delimited string that specifies the requested scope of the
240
- * access request.
238
+ * Desired scope of access. If this field is left empty, only an access token is granted.
239
+ * To received a refresh token, pass `offline_access` as the value of this field.
241
240
  */
242
241
  scope?: string | null;
243
242
  /**
244
- * An opaque value, used for security purposes. If this request parameter is set
245
- * in the request, then it is returned to the application as part of the redirect_uri.
243
+ * A value used to confirm the state of an application before and after it makes an authorization
244
+ * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
245
+ * is redirected there.
246
+ * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
246
247
  */
247
248
  state?: string;
248
- /** (Optional) How the result of the authorization request is formatted */
249
+ /**
250
+ * esired response format.
251
+ *
252
+ * Supported values:
253
+ * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
254
+ * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
255
+ * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).
256
+ *
257
+ * Default value: `query`
258
+ */
249
259
  responseMode?: string | null;
250
260
  /**
251
- * code_challenge is the code challenge sent by the client as part of the PKCE
252
- * process. This field is only used if response_type is "code".
261
+ * Code challenge to use for PKCE verification.
262
+ * This field is only used if `responseType` is set to `code`.
253
263
  */
254
264
  codeChallenge?: string | null;
255
265
  /**
256
- * code_challenge_method is the code challenge method sent by the client as part
257
- * of the PKCE process. This field is only used if response_type is "code".
266
+ * Code challenge method to use for PKCE verification.
267
+ * This field is only used if `responseType` is set to `code`.
268
+ *
269
+ * Supported values:
270
+ * + `S256`: The code challenge is transformed using SHA-256 encyption.
271
+ * + `S512`: The code challenge is transformed using SHA-512 encyption.
258
272
  */
259
273
  codeChallengeMethod?: string | null;
260
- /** Current client session */
274
+ /** Session token of the site visitor to authorize. */
261
275
  sessionToken?: string | null;
262
- /**
263
- * Optional fields for errors
264
- * A short error code that describes the type of error that occurred (e.g. "invalid_request")
265
- */
266
- error?: string | null;
267
- /** A human-readable description of the error that occurred */
268
- errorDescription?: string | null;
269
276
  }
270
277
  export interface RedirectSessionLogoutParams {
271
278
  /** __Required.__ ID of the OAuth app authorizing the client. */
@@ -1 +1 @@
1
- {"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,4GAA8F;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,M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W,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AA/DD,sDA+DC"}
1
+ {"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,4GAA8F;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AA+K5B,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAgID,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAXW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAWhC;AAw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;YACD,oBAAoB,EAAE,sBAAsB;SAC7C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAE/C,MAAM,OAAO,GACX,sCAAsC,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAExE,KAAK,CAAC,iDAAiD,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE7E,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,+CAAvB,WAAW,CAAgB,CAAC;QAC5B,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AA/DD,sDA+DC"}
@@ -217,49 +217,56 @@ export interface RedirectSessionAuthorizeParams {
217
217
  * the authorization process.
218
218
  */
219
219
  export interface AuthorizeRequest {
220
- /** client_id is the unique identifier of the client application. */
220
+ /** ID of the Wix OAuth app requesting authorization. */
221
221
  clientId?: string;
222
222
  /**
223
- * response_type specifies the desired authorization grant type.
224
- * This can be "code" for the authorization code.
223
+ * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
224
+ *
225
+ * Supported values:
226
+ * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
225
227
  */
226
228
  responseType?: string;
229
+ /** URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not. */
230
+ redirectUri?: string | null;
227
231
  /**
228
- * redirect_uri is the URI to which the authorization server will redirect the
229
- * user-agent after the user grants/denies permission.
230
- */
231
- redirectUri?: string;
232
- /**
233
- * scope is a space-delimited string that specifies the requested scope of the
234
- * access request.
232
+ * Desired scope of access. If this field is left empty, only an access token is granted.
233
+ * To received a refresh token, pass `offline_access` as the value of this field.
235
234
  */
236
235
  scope?: string | null;
237
236
  /**
238
- * An opaque value, used for security purposes. If this request parameter is set
239
- * in the request, then it is returned to the application as part of the redirect_uri.
237
+ * A value used to confirm the state of an application before and after it makes an authorization
238
+ * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
239
+ * is redirected there.
240
+ * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
240
241
  */
241
242
  state?: string;
242
- /** (Optional) How the result of the authorization request is formatted */
243
+ /**
244
+ * esired response format.
245
+ *
246
+ * Supported values:
247
+ * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
248
+ * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
249
+ * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).
250
+ *
251
+ * Default value: `query`
252
+ */
243
253
  responseMode?: string | null;
244
254
  /**
245
- * code_challenge is the code challenge sent by the client as part of the PKCE
246
- * process. This field is only used if response_type is "code".
255
+ * Code challenge to use for PKCE verification.
256
+ * This field is only used if `responseType` is set to `code`.
247
257
  */
248
258
  codeChallenge?: string | null;
249
259
  /**
250
- * code_challenge_method is the code challenge method sent by the client as part
251
- * of the PKCE process. This field is only used if response_type is "code".
260
+ * Code challenge method to use for PKCE verification.
261
+ * This field is only used if `responseType` is set to `code`.
262
+ *
263
+ * Supported values:
264
+ * + `S256`: The code challenge is transformed using SHA-256 encyption.
265
+ * + `S512`: The code challenge is transformed using SHA-512 encyption.
252
266
  */
253
267
  codeChallengeMethod?: string | null;
254
- /** Current client session */
268
+ /** Session token of the site visitor to authorize. */
255
269
  sessionToken?: string | null;
256
- /**
257
- * Optional fields for errors
258
- * A short error code that describes the type of error that occurred (e.g. "invalid_request")
259
- */
260
- error?: string | null;
261
- /** A human-readable description of the error that occurred */
262
- errorDescription?: string | null;
263
270
  }
264
271
  export interface RedirectSessionLogoutParams {
265
272
  /** *Required.** ID of the OAuth app authorizing the client. */
@@ -1 +1 @@
1
- {"version":3,"file":"headless-v1-redirect-session.types.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.types.ts"],"names":[],"mappings":"AA6KA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAyHD,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAwED,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB"}
1
+ {"version":3,"file":"headless-v1-redirect-session.types.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.types.ts"],"names":[],"mappings":"AA6KA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAgID,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACnB,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAwED,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8BAA8B;IAC9B,mCAAmB,CAAA;IACnB,mDAAmD;IACnD,iCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAqB,CAAA;IACrB,sDAAsD;IACtD,uCAAuB,CAAA;AACzB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB"}
@@ -223,49 +223,56 @@ export interface RedirectSessionAuthorizeParams {
223
223
  * the authorization process.
224
224
  */
225
225
  export interface AuthorizeRequest {
226
- /** client_id is the unique identifier of the client application. */
226
+ /** ID of the Wix OAuth app requesting authorization. */
227
227
  clientId?: string;
228
228
  /**
229
- * response_type specifies the desired authorization grant type.
230
- * This can be "code" for the authorization code.
229
+ * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
230
+ *
231
+ * Supported values:
232
+ * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
231
233
  */
232
234
  responseType?: string;
235
+ /** URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not. */
236
+ redirectUri?: string | null;
233
237
  /**
234
- * redirect_uri is the URI to which the authorization server will redirect the
235
- * user-agent after the user grants/denies permission.
236
- */
237
- redirectUri?: string;
238
- /**
239
- * scope is a space-delimited string that specifies the requested scope of the
240
- * access request.
238
+ * Desired scope of access. If this field is left empty, only an access token is granted.
239
+ * To received a refresh token, pass `offline_access` as the value of this field.
241
240
  */
242
241
  scope?: string | null;
243
242
  /**
244
- * An opaque value, used for security purposes. If this request parameter is set
245
- * in the request, then it is returned to the application as part of the redirect_uri.
243
+ * A value used to confirm the state of an application before and after it makes an authorization
244
+ * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
245
+ * is redirected there.
246
+ * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
246
247
  */
247
248
  state?: string;
248
- /** (Optional) How the result of the authorization request is formatted */
249
+ /**
250
+ * esired response format.
251
+ *
252
+ * Supported values:
253
+ * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
254
+ * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
255
+ * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).
256
+ *
257
+ * Default value: `query`
258
+ */
249
259
  responseMode?: string | null;
250
260
  /**
251
- * code_challenge is the code challenge sent by the client as part of the PKCE
252
- * process. This field is only used if response_type is "code".
261
+ * Code challenge to use for PKCE verification.
262
+ * This field is only used if `responseType` is set to `code`.
253
263
  */
254
264
  codeChallenge?: string | null;
255
265
  /**
256
- * code_challenge_method is the code challenge method sent by the client as part
257
- * of the PKCE process. This field is only used if response_type is "code".
266
+ * Code challenge method to use for PKCE verification.
267
+ * This field is only used if `responseType` is set to `code`.
268
+ *
269
+ * Supported values:
270
+ * + `S256`: The code challenge is transformed using SHA-256 encyption.
271
+ * + `S512`: The code challenge is transformed using SHA-512 encyption.
258
272
  */
259
273
  codeChallengeMethod?: string | null;
260
- /** Current client session */
274
+ /** Session token of the site visitor to authorize. */
261
275
  sessionToken?: string | null;
262
- /**
263
- * Optional fields for errors
264
- * A short error code that describes the type of error that occurred (e.g. "invalid_request")
265
- */
266
- error?: string | null;
267
- /** A human-readable description of the error that occurred */
268
- errorDescription?: string | null;
269
276
  }
270
277
  export interface RedirectSessionLogoutParams {
271
278
  /** __Required.__ ID of the OAuth app authorizing the client. */
@@ -1 +1 @@
1
- {"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,sCAAsC,MAAM,qCAAqC,CAAC;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AA+K5B,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAyHD,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,qDAAqD;IACrD,sDAA6B,CAAA;IAC7B,0CAA0C;IAC1C,8CAAqB,CAAA;IACrB,wCAAwC;IACxC,0CAAiB,CAAA;IACjB,4CAA4C;IAC5C,wDAA+B,CAAA;IAC/B,qCAAqC;IACrC,0CAAiB,CAAA;AACn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AC;gBAC/B,cAAc,EAAE,aAAa;aAC9B;YACD,oBAAoB,EAAE,sBAAsB;SAC7C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAE/C,MAAM,OAAO,GACX,sCAAsC,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAExE,KAAK,CAAC,iDAAiD,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE7E,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,+CAAvB,WAAW,CAAgB,CAAC;QAC5B,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,cAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF"}
1
+ {"version":3,"file":"headless-v1-redirect-session.universal.js","sourceRoot":"","sources":["../../../src/headless-v1-redirect-session.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,sCAAsC,MAAM,qCAAqC,CAAC;AAE9F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACp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,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,cAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/redirects",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -33,5 +33,5 @@
33
33
  "groupId": "com.wixpress.public-sdk-autogen"
34
34
  }
35
35
  },
36
- "falconPackageHash": "15374e20aef4eb5a6897a97a3a97de337e7074d77fd660615d86bd0b"
36
+ "falconPackageHash": "2301591e05e2db1a8c87e40c7c63704c7c5323be4ac7e517ab6adeff"
37
37
  }