@commercetools/connect-payments-sdk 0.0.6 → 0.0.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.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -0
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JWTAuthenticationHook, Oauth2AuthenticationHook, RequestContextData, RequestContextProvider, SessionAuthenticationHook } from './api';
|
|
1
|
+
import { JWTAuthenticationHook, Oauth2AuthenticationHook, RequestContextData, RequestContextProvider, SessionAuthenticationHook, AuthorityAuthorizationHook } from './api';
|
|
2
2
|
import { DefaultCommercetoolsAPI } from './commercetools/api/root-api';
|
|
3
3
|
import { DefaultAuthorizationService } from './commercetools/services/ct-authorization.service';
|
|
4
4
|
import { DefaultCartService } from './commercetools/services/ct-cart.service';
|
|
@@ -30,4 +30,5 @@ export declare const setupPaymentSDK: (opts: {
|
|
|
30
30
|
sessionAuthHookFn: SessionAuthenticationHook;
|
|
31
31
|
jwtAuthHookFn: JWTAuthenticationHook;
|
|
32
32
|
oauth2AuthHookFn: Oauth2AuthenticationHook;
|
|
33
|
+
authorityAuthorizationHookFn: AuthorityAuthorizationHook;
|
|
33
34
|
};
|
package/dist/index.js
CHANGED
|
@@ -70,6 +70,7 @@ const setupPaymentSDK = (opts) => {
|
|
|
70
70
|
clientSecret: opts.clientSecret,
|
|
71
71
|
authUrl: opts.authUrl,
|
|
72
72
|
});
|
|
73
|
+
const authorityAuthorizationManager = new security_1.AuthorityAuthorizationManager();
|
|
73
74
|
const jwtAuthenticationManager = new security_1.JWTAuthenticationManager({
|
|
74
75
|
jwtService,
|
|
75
76
|
iss: opts.jwtIssuer,
|
|
@@ -87,6 +88,10 @@ const setupPaymentSDK = (opts) => {
|
|
|
87
88
|
authenticationManager: oauth2AuthenticationManager,
|
|
88
89
|
contextProvider,
|
|
89
90
|
});
|
|
91
|
+
const authorityAuthorizationHookFn = new api_1.AuthorityAuthorizationHook({
|
|
92
|
+
authorizationManager: authorityAuthorizationManager,
|
|
93
|
+
contextProvider,
|
|
94
|
+
});
|
|
90
95
|
return {
|
|
91
96
|
ctAPI,
|
|
92
97
|
ctCartService,
|
|
@@ -96,6 +101,7 @@ const setupPaymentSDK = (opts) => {
|
|
|
96
101
|
sessionAuthHookFn,
|
|
97
102
|
jwtAuthHookFn,
|
|
98
103
|
oauth2AuthHookFn,
|
|
104
|
+
authorityAuthorizationHookFn,
|
|
99
105
|
};
|
|
100
106
|
};
|
|
101
107
|
exports.setupPaymentSDK = setupPaymentSDK;
|
package/dist/security/index.d.ts
CHANGED
package/dist/security/index.js
CHANGED
|
@@ -21,3 +21,4 @@ __exportStar(require("./authn/session-authn-manager"), exports);
|
|
|
21
21
|
__exportStar(require("./authn/types/authn.type"), exports);
|
|
22
22
|
__exportStar(require("./services/jwt.service"), exports);
|
|
23
23
|
__exportStar(require("./services/oauth2.service"), exports);
|
|
24
|
+
__exportStar(require("./authz/authorization-manager"), exports);
|