@trunkrs/common 1.4.12 → 1.4.16
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/package.json
CHANGED
|
@@ -8,14 +8,14 @@ const enum_1 = require("../../models/enum");
|
|
|
8
8
|
class CognitoOAuthClient extends OAuthClient_1.default {
|
|
9
9
|
async clientCredentialsFlow(credentials) {
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
12
|
-
url: `${credentials.domain}/oauth2/token?grant_type
|
|
11
|
+
const data = await this.httpClient.post({
|
|
12
|
+
url: `${credentials.domain}/oauth2/token?grant_type=client_credentials`,
|
|
13
13
|
authentication: {
|
|
14
14
|
username: credentials.clientId,
|
|
15
15
|
password: credentials.clientSecret,
|
|
16
16
|
},
|
|
17
17
|
headers: {
|
|
18
|
-
'
|
|
18
|
+
'content-type': enum_1.MimeType.FormUrlEncoded,
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
21
|
return OAuthClient_1.default.toOAuthResponse(data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CognitoOAuthClient.js","sourceRoot":"","sources":["../../../services/client/CognitoOAuthClient.ts"],"names":[],"mappings":";;;;;AAAA,gEAGsB;AACtB,4CAA4C;AAE5C,MAAM,kBAAmB,SAAQ,qBAAW;IACnC,KAAK,CAAC,qBAAqB,CAChC,WAAqC;QAErC,IAAI;YACF,MAAM,
|
|
1
|
+
{"version":3,"file":"CognitoOAuthClient.js","sourceRoot":"","sources":["../../../services/client/CognitoOAuthClient.ts"],"names":[],"mappings":";;;;;AAAA,gEAGsB;AACtB,4CAA4C;AAE5C,MAAM,kBAAmB,SAAQ,qBAAW;IACnC,KAAK,CAAC,qBAAqB,CAChC,WAAqC;QAErC,IAAI;YACF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAmB;gBACxD,GAAG,EAAE,GAAG,WAAW,CAAC,MAAM,6CAA6C;gBACvE,cAAc,EAAE;oBACd,QAAQ,EAAE,WAAW,CAAC,QAAQ;oBAC9B,QAAQ,EAAE,WAAW,CAAC,YAAY;iBACnC;gBACD,OAAO,EAAE;oBACP,cAAc,EAAE,eAAQ,CAAC,cAAc;iBACxC;aACF,CAAC,CAAA;YAEF,OAAO,qBAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;SACzC;QAAC,OAAO,KAAU,EAAE;YACnB,MAAM,qBAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;SACtC;IACH,CAAC;CACF;AAED,kBAAe,kBAAkB,CAAA"}
|