@elliemae/pui-app-sdk 4.13.6 → 4.13.7

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.
@@ -27,13 +27,15 @@ var import_http_client = require("../../communication/http-client/index.js");
27
27
  const getToken = async ({
28
28
  clientId,
29
29
  redirectUri,
30
- idpCode
30
+ idpCode,
31
+ scope
31
32
  }) => {
32
33
  const params = new URLSearchParams();
33
34
  params.append("grant_type", "authorization_code");
34
35
  params.append("client_id", clientId);
35
36
  params.append("redirect_uri", redirectUri);
36
37
  params.append("code", idpCode);
38
+ params.append("scope", scope);
37
39
  const { data } = await (0, import_http_client.getHTTPClient)().post(
38
40
  "/oauth2/v1/token",
39
41
  params
@@ -113,7 +113,8 @@ const authorize = async ({
113
113
  const { tokenType, accessToken } = await (0, import_auth.getToken)({
114
114
  idpCode,
115
115
  redirectUri,
116
- clientId
116
+ clientId,
117
+ scope
117
118
  });
118
119
  const authorizationToken = `${tokenType} ${accessToken}`;
119
120
  (0, import_helper.setAuthorizationHeader)(authorizationToken);
@@ -2,13 +2,15 @@ import { getHTTPClient } from "../../communication/http-client/index.js";
2
2
  const getToken = async ({
3
3
  clientId,
4
4
  redirectUri,
5
- idpCode
5
+ idpCode,
6
+ scope
6
7
  }) => {
7
8
  const params = new URLSearchParams();
8
9
  params.append("grant_type", "authorization_code");
9
10
  params.append("client_id", clientId);
10
11
  params.append("redirect_uri", redirectUri);
11
12
  params.append("code", idpCode);
13
+ params.append("scope", scope);
12
14
  const { data } = await getHTTPClient().post(
13
15
  "/oauth2/v1/token",
14
16
  params
@@ -89,7 +89,8 @@ const authorize = async ({
89
89
  const { tokenType, accessToken } = await getToken({
90
90
  idpCode,
91
91
  redirectUri,
92
- clientId
92
+ clientId,
93
+ scope
93
94
  });
94
95
  const authorizationToken = `${tokenType} ${accessToken}`;
95
96
  setAuthorizationHeader(authorizationToken);
@@ -3,6 +3,7 @@ interface GetTokenRequestParams {
3
3
  clientId: string;
4
4
  redirectUri: string;
5
5
  idpCode: string;
6
+ scope: string;
6
7
  }
7
8
  export interface GetTokenResponse {
8
9
  token_type: string;
@@ -14,7 +15,7 @@ interface GetTokenError {
14
15
  export interface GetTokenErrorResponse extends AxiosError {
15
16
  response: AxiosResponse<GetTokenError>;
16
17
  }
17
- export declare const getToken: ({ clientId, redirectUri, idpCode, }: GetTokenRequestParams) => Promise<{
18
+ export declare const getToken: ({ clientId, redirectUri, idpCode, scope, }: GetTokenRequestParams) => Promise<{
18
19
  tokenType: string;
19
20
  accessToken: string;
20
21
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-app-sdk",
3
- "version": "4.13.6",
3
+ "version": "4.13.7",
4
4
  "description": "ICE MT UI Platform Application SDK ",
5
5
  "sideEffects": [
6
6
  "*.css",