@daffodil/auth 0.48.2 → 0.49.0
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/esm2020/driver/magento/apollo-bearer-token-link-generator.mjs +6 -2
- package/esm2020/state/auth-state.module.mjs +10 -4
- package/esm2020/state/config/default.mjs +3 -1
- package/esm2020/state/config/type.mjs +1 -1
- package/esm2020/state/effects/redirect.effects.mjs +35 -0
- package/fesm2015/daffodil-auth-driver-magento.mjs +5 -1
- package/fesm2015/daffodil-auth-driver-magento.mjs.map +1 -1
- package/fesm2015/daffodil-auth-state.mjs +34 -2
- package/fesm2015/daffodil-auth-state.mjs.map +1 -1
- package/fesm2020/daffodil-auth-driver-magento.mjs +5 -1
- package/fesm2020/daffodil-auth-driver-magento.mjs.map +1 -1
- package/fesm2020/daffodil-auth-state.mjs +35 -2
- package/fesm2020/daffodil-auth-state.mjs.map +1 -1
- package/package.json +3 -3
- package/state/auth-state.module.d.ts +1 -1
- package/state/config/type.d.ts +10 -0
- package/state/effects/redirect.effects.d.ts +17 -0
|
@@ -14,7 +14,11 @@ export class MagentoAuthApolloBearerTokenLinkGenerator {
|
|
|
14
14
|
}
|
|
15
15
|
getLink() {
|
|
16
16
|
return new ApolloLink((operation, forward) => {
|
|
17
|
-
|
|
17
|
+
let token = null;
|
|
18
|
+
try {
|
|
19
|
+
token = this.storage.getAuthToken();
|
|
20
|
+
}
|
|
21
|
+
catch (e) { }
|
|
18
22
|
if (token) {
|
|
19
23
|
operation.setContext({
|
|
20
24
|
headers: {
|
|
@@ -35,4 +39,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
35
39
|
providedIn: 'root',
|
|
36
40
|
}]
|
|
37
41
|
}], ctorParameters: function () { return [{ type: i1.DaffAuthStorageService }]; } });
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJz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BlcmF0aW9uLCBmb3J3YXJkKSA9PiB7XG4gICAgICBsZXQgdG9rZW4gPSBudWxsO1xuXG4gICAgICB0cnkge1xuICAgICAgICB0b2tlbiA9IHRoaXMuc3RvcmFnZS5nZXRBdXRoVG9rZW4oKTtcbiAgICAgIH0gY2F0Y2goZSl7fVxuXG4gICAgICBpZiAodG9rZW4pIHtcbiAgICAgICAgb3BlcmF0aW9uLnNldENvbnRleHQoe1xuICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgIC4uLm9wZXJhdGlvbi5nZXRDb250ZXh0KCkuaGVhZGVycyxcbiAgICAgICAgICAgIGF1dGhvcml6YXRpb246IGBCZWFyZXIgJHt0b2tlbn1gLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGZvcndhcmQob3BlcmF0aW9uKTtcbiAgICB9KTtcbiAgfVxufVxuIl19
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { NgModule, } from '@angular/core';
|
|
2
2
|
import { EffectsModule } from '@ngrx/effects';
|
|
3
3
|
import { StoreModule } from '@ngrx/store';
|
|
4
|
-
import { provideDaffAuthStateConfig, } from './config/public_api';
|
|
4
|
+
import { daffAuthStateDefaultConfig, provideDaffAuthStateConfig, } from './config/public_api';
|
|
5
5
|
import { DaffAuthEffects } from './effects/auth.effects';
|
|
6
6
|
import { DaffAuthLoginEffects } from './effects/login.effects';
|
|
7
|
+
import { DaffAuthRedirectEffects } from './effects/redirect.effects';
|
|
7
8
|
import { DaffAuthRegisterEffects } from './effects/register.effects';
|
|
8
9
|
import { DaffAuthResetPasswordEffects } from './effects/reset-password.effects';
|
|
9
10
|
import { DAFF_AUTH_STORE_FEATURE_KEY, daffAuthReducers, } from './reducers/public_api';
|
|
@@ -11,11 +12,14 @@ import * as i0 from "@angular/core";
|
|
|
11
12
|
import * as i1 from "@ngrx/store";
|
|
12
13
|
import * as i2 from "@ngrx/effects";
|
|
13
14
|
export class DaffAuthStateModule {
|
|
14
|
-
static withConfig(config) {
|
|
15
|
+
static withConfig(config = {}) {
|
|
15
16
|
return {
|
|
16
17
|
ngModule: DaffAuthStateModule,
|
|
17
18
|
providers: [
|
|
18
|
-
provideDaffAuthStateConfig(
|
|
19
|
+
provideDaffAuthStateConfig({
|
|
20
|
+
...daffAuthStateDefaultConfig,
|
|
21
|
+
...config,
|
|
22
|
+
}),
|
|
19
23
|
],
|
|
20
24
|
};
|
|
21
25
|
}
|
|
@@ -29,6 +33,7 @@ export class DaffAuthStateModule {
|
|
|
29
33
|
DaffAuthLoginEffects,
|
|
30
34
|
DaffAuthRegisterEffects,
|
|
31
35
|
DaffAuthResetPasswordEffects,
|
|
36
|
+
DaffAuthRedirectEffects,
|
|
32
37
|
]),
|
|
33
38
|
]] });
|
|
34
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthStateModule, decorators: [{
|
|
@@ -41,8 +46,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
41
46
|
DaffAuthLoginEffects,
|
|
42
47
|
DaffAuthRegisterEffects,
|
|
43
48
|
DaffAuthResetPasswordEffects,
|
|
49
|
+
DaffAuthRedirectEffects,
|
|
44
50
|
]),
|
|
45
51
|
],
|
|
46
52
|
}]
|
|
47
53
|
}] });
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC1zdGF0ZS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2F1dGgvc3RhdGUvc3JjL2F1dGgtc3RhdGUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxRQUFRLEdBQ1QsTUFBTSxlQUFlLENBQUM7QUF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ZmZBdXRoU3RhdGVEZWZhdWx0Q29uZmlnLFxuICAgICAgICAgIC4uLmNvbmZpZyxcbiAgICAgICAgfSksXG4gICAgICBdLFxuICAgIH07XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const TWENTY_MINUTES = 1.2e6;
|
|
2
2
|
export const daffAuthStateDefaultConfig = {
|
|
3
3
|
checkInterval: TWENTY_MINUTES,
|
|
4
|
+
authCompleteRedirectPath: '/',
|
|
5
|
+
logoutRedirectPath: '/',
|
|
4
6
|
};
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvYXV0aC9zdGF0ZS9zcmMvY29uZmlnL2RlZmF1bHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsTUFBTSxjQUFjLEdBQUcsS0FBSyxDQUFDO0FBRTdCLE1BQU0sQ0FBQyxNQUFNLDBCQUEwQixHQUF3QjtJQUM3RCxhQUFhLEVBQUUsY0FBYztJQUM3Qix3QkFBd0IsRUFBRSxHQUFHO0lBQzdCLGtCQUFrQixFQUFFLEdBQUc7Q0FDeEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERhZmZBdXRoU3RhdGVDb25maWcgfSBmcm9tICcuL3R5cGUnO1xuXG5jb25zdCBUV0VOVFlfTUlOVVRFUyA9IDEuMmU2O1xuXG5leHBvcnQgY29uc3QgZGFmZkF1dGhTdGF0ZURlZmF1bHRDb25maWc6IERhZmZBdXRoU3RhdGVDb25maWcgPSB7XG4gIGNoZWNrSW50ZXJ2YWw6IFRXRU5UWV9NSU5VVEVTLFxuICBhdXRoQ29tcGxldGVSZWRpcmVjdFBhdGg6ICcvJyxcbiAgbG9nb3V0UmVkaXJlY3RQYXRoOiAnLycsXG59O1xuIl19
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvYXV0aC9zdGF0ZS9zcmMvY29uZmlnL3R5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgRGFmZkF1dGhTdGF0ZUNvbmZpZyB7XG4gIC8qKlxuICAgKiBIb3cgb2Z0ZW4gRGFmZm9kaWwgd2lsbCBydW4gdGhlIGF1dGggY2hlY2suXG4gICAqIERlZmF1bHRzIHRvIHR3ZW50eSBtaW51dGVzLlxuICAgKi9cbiAgY2hlY2tJbnRlcnZhbDogbnVtYmVyO1xuXG4gIC8qKlxuICAgKiBUaGUgcGF0aCB0byB3aGljaCB0aGUgdXNlciB3aWxsIGJlIHJlZGlyZWN0ZWQgd2hlbiB0aGV5IGFyZSBsb2dnZWQgaW4gYW5kIHRoZSBhdXRoIHRva2VuIGlzIHN0b3JlZC5cbiAgICogRGVmYXVsdHMgdG8gYCcvJ2AuXG4gICAqL1xuICBhdXRoQ29tcGxldGVSZWRpcmVjdFBhdGg6IHN0cmluZztcblxuICAvKipcbiAgICogVGhlIHBhdGggdG8gd2hpY2ggdGhlIHVzZXIgd2lsbCBiZSByZWRpcmVjdGVkIHdoZW4gdGhleSBhcmUgbG9nZ2VkIG91dC5cbiAgICogRGVmYXVsdHMgdG8gYCcvJ2AuXG4gICAqL1xuICBsb2dvdXRSZWRpcmVjdFBhdGg6IHN0cmluZztcbn1cbiJdfQ==
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Inject, Injectable, } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { Actions, createEffect, ofType, } from '@ngrx/effects';
|
|
4
|
+
import { EMPTY } from 'rxjs';
|
|
5
|
+
import { switchMap, tap, } from 'rxjs/operators';
|
|
6
|
+
import { DaffAuthActionTypes, DaffAuthLoginActionTypes, } from '../actions/public_api';
|
|
7
|
+
import { DAFF_AUTH_STATE_CONFIG, } from '../config/public_api';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@ngrx/effects";
|
|
10
|
+
import * as i2 from "@angular/router";
|
|
11
|
+
/**
|
|
12
|
+
* Redirects the user to certain pages based on certain auth actions.
|
|
13
|
+
*/
|
|
14
|
+
export class DaffAuthRedirectEffects {
|
|
15
|
+
constructor(actions$, router, config) {
|
|
16
|
+
this.actions$ = actions$;
|
|
17
|
+
this.router = router;
|
|
18
|
+
this.config = config;
|
|
19
|
+
this.redirectAfterLoginOrRegister$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthActionTypes.AuthCompleteAction), tap(() => {
|
|
20
|
+
this.router.navigateByUrl(this.config.authCompleteRedirectPath);
|
|
21
|
+
}), switchMap(() => EMPTY)), { dispatch: false });
|
|
22
|
+
this.redirectAfterLogout$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthLoginActionTypes.LogoutSuccessAction), tap(() => {
|
|
23
|
+
this.router.navigateByUrl(this.config.logoutRedirectPath);
|
|
24
|
+
}), switchMap(() => EMPTY)), { dispatch: false });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/** @nocollapse */ DaffAuthRedirectEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects, deps: [{ token: i1.Actions }, { token: i2.Router }, { token: DAFF_AUTH_STATE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
+
/** @nocollapse */ DaffAuthRedirectEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects, decorators: [{
|
|
30
|
+
type: Injectable
|
|
31
|
+
}], ctorParameters: function () { return [{ type: i1.Actions }, { type: i2.Router }, { type: undefined, decorators: [{
|
|
32
|
+
type: Inject,
|
|
33
|
+
args: [DAFF_AUTH_STATE_CONFIG]
|
|
34
|
+
}] }]; } });
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVkaXJlY3QuZWZmZWN0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvYXV0aC9zdGF0ZS9zcmMvZWZmZWN0cy9yZWRpcmVjdC5lZmZlY3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxNQUFNLEVBQ04sVUFBVSxHQUNYLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUN6QyxPQUFPLEVBQ0wsT0FBTyxFQUNQLFlBQVksRUFDWixNQUFNLEdBQ1AsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUM3QixPQUFPLEVBQ0wsU0FBUyxFQUNULEdBQUcsR0FDSixNQUFNLGdCQUFnQixDQUFDO0FBRXhCLE9BQU8sRUFDTCxtQkFBbUIsRUFFbkIsd0JBQXdCLEdBQ3pCLE1BQU0sdUJBQXVCLENBQUM7QUFDL0IsT0FBTyxFQUVMLHNCQUFzQixHQUN2QixNQUFNLHNCQUFzQixDQUFDOzs7O0FBRTlCOztHQUVHO0FBRUgsTUFBTSxPQUFPL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RkZfQVVUSF9TVEFURV9DT05GSUcpIHByaXZhdGUgY29uZmlnOiBEYWZmQXV0aFN0YXRlQ29uZmlnLFxuICApIHt9XG5cbiAgcmVkaXJlY3RBZnRlckxvZ2luT3JSZWdpc3RlciQgPSBjcmVhdGVFZmZlY3QoKCkgPT4gdGhpcy5hY3Rpb25zJC5waXBlKFxuICAgIG9mVHlwZTxEYWZmQXV0aENvbXBsZXRlPihEYWZmQXV0aEFjdGlvblR5cGVzLkF1dGhDb21wbGV0ZUFjdGlvbiksXG4gICAgdGFwKCgpID0+IHtcbiAgICAgIHRoaXMucm91dGVyLm5hdmlnYXRlQnlVcmwodGhpcy5jb25maWcuYXV0aENvbXBsZXRlUmVkaXJlY3RQYXRoKTtcbiAgICB9KSxcbiAgICBzd2l0Y2hNYXAoKCkgPT4gRU1QVFkpLFxuICApLCB7IGRpc3BhdGNoOiBmYWxzZSB9KTtcblxuICByZWRpcmVjdEFmdGVyTG9nb3V0JCA9IGNyZWF0ZUVmZmVjdCgoKSA9PiB0aGlzLmFjdGlvbnMkLnBpcGUoXG4gICAgb2ZUeXBlKERhZmZBdXRoTG9naW5BY3Rpb25UeXBlcy5Mb2dvdXRTdWNjZXNzQWN0aW9uKSxcbiAgICB0YXAoKCkgPT4ge1xuICAgICAgdGhpcy5yb3V0ZXIubmF2aWdhdGVCeVVybCh0aGlzLmNvbmZpZy5sb2dvdXRSZWRpcmVjdFBhdGgpO1xuICAgIH0pLFxuICAgIHN3aXRjaE1hcCgoKSA9PiBFTVBUWSksXG4gICksIHsgZGlzcGF0Y2g6IGZhbHNlIH0pO1xufVxuIl19
|
|
@@ -343,7 +343,11 @@ class MagentoAuthApolloBearerTokenLinkGenerator {
|
|
|
343
343
|
}
|
|
344
344
|
getLink() {
|
|
345
345
|
return new ApolloLink((operation, forward) => {
|
|
346
|
-
|
|
346
|
+
let token = null;
|
|
347
|
+
try {
|
|
348
|
+
token = this.storage.getAuthToken();
|
|
349
|
+
}
|
|
350
|
+
catch (e) { }
|
|
347
351
|
if (token) {
|
|
348
352
|
operation.setContext({
|
|
349
353
|
headers: Object.assign(Object.assign({}, operation.getContext().headers), { authorization: `Bearer ${token}` }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-auth-driver-magento.mjs","sources":["../../../libs/auth/driver/magento/src/errors/codes.ts","../../../libs/auth/driver/magento/src/errors/map.ts","../../../libs/auth/driver/magento/src/errors/transform.ts","../../../libs/auth/driver/magento/src/queries/check-token.ts","../../../libs/auth/driver/magento/src/queries/create-customer.ts","../../../libs/auth/driver/magento/src/queries/generate-token.ts","../../../libs/auth/driver/magento/src/queries/revoke-customer-token.ts","../../../libs/auth/driver/magento/src/queries/send-reset-email.ts","../../../libs/auth/driver/magento/src/queries/reset-password.ts","../../../libs/auth/driver/magento/src/validators/check-token.ts","../../../libs/auth/driver/magento/src/validators/generate-token.ts","../../../libs/auth/driver/magento/src/validators/revoke-token.ts","../../../libs/auth/driver/magento/src/validators/send-reset-email.ts","../../../libs/auth/driver/magento/src/validators/reset-password.ts","../../../libs/auth/driver/magento/src/auth.service.ts","../../../libs/auth/driver/magento/src/transforms/auth-transformer.service.ts","../../../libs/auth/driver/magento/src/login.service.ts","../../../libs/auth/driver/magento/src/register.service.ts","../../../libs/auth/driver/magento/src/reset-password.service.ts","../../../libs/auth/driver/magento/src/auth-driver.module.ts","../../../libs/auth/driver/magento/src/apollo-bearer-token-link-generator.ts","../../../libs/auth/driver/magento/src/daffodil-auth-driver-magento.ts"],"sourcesContent":["export enum MagentoAuthGraphQlErrorCode {\n UNAUTHORIZED = 'graphql-authorization',\n AUTHENTICATION_FAILED = 'graphql-authentication',\n BAD_INPUT = 'graphql-input'\n}\n","import {\n DaffUnauthorizedError,\n DaffAuthenticationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffBadInputError } from '@daffodil/driver';\n\nimport { MagentoAuthGraphQlErrorCode } from './codes';\n\nexport const DaffAuthMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoAuthGraphQlErrorCode.UNAUTHORIZED]: DaffUnauthorizedError,\n [MagentoAuthGraphQlErrorCode.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [MagentoAuthGraphQlErrorCode.BAD_INPUT]: DaffBadInputError,\n};\n","import { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffAuthMagentoErrorMap } from './map';\n\nexport const transformMagentoAuthError = (error: any): Error => daffTransformMagentoError(error, DaffAuthMagentoErrorMap) || new DaffAuthInvalidAPIResponseError(error.message);\n","import { gql } from 'apollo-angular';\n\n\nexport const checkTokenQuery = gql`\n query MagentoCheckToken {\n customer {\n email\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const createCustomerMutation = gql`\n mutation MagentoCreateCustomer(\n $email: String!,\n $password: String!,\n $subscribe: Boolean!,\n $firstname: String!,\n $lastname: String!,\n ) {\n createCustomerV2(input: {\n firstname: $firstname,\n lastname: $lastname,\n email: $email,\n password: $password,\n is_subscribed: $subscribe\n }) {\n customer {\n email\n }\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const generateTokenMutation = gql`\n mutation MagentoGenerateToken($email: String!, $password: String!) {\n generateCustomerToken(\n email: $email,\n password: $password\n ) {\n token\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const revokeCustomerTokenMutation = gql`\n mutation revokeCustomerToken {\n revokeCustomerToken {\n result\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const sendPasswordResetEmailMutation = gql`\n mutation MagentoSendPasswordResetEmail($email: String!) {\n requestPasswordResetEmail(\n email: $email,\n )\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const resetPasswordMutation = gql`\n mutation MagentoResetPassword($email: String!, $password: String!, $token: String!) {\n resetPassword(\n email: $email,\n newPassword: $password\n resetPasswordToken: $token\n )\n }\n`;\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoCheckTokenResponse } from '../queries/public_api';\n\nexport const validateCheckTokenResponse = (response: ApolloQueryResult<MagentoCheckTokenResponse>) => {\n if (response.data.customer.email) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Check token response does not contain a valid customer email.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoGenerateTokenResponse } from '../queries/public_api';\n\nexport const validateGenerateTokenResponse = (response: ApolloQueryResult<MagentoGenerateTokenResponse>) => {\n if (response.data.generateCustomerToken.token) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Generate token response does not contain an auth token.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoRevokeCustomerTokenResponse } from '../queries/public_api';\n\nexport const validateRevokeTokenResponse = (response: ApolloQueryResult<MagentoRevokeCustomerTokenResponse>) => {\n if (response.data.revokeCustomerToken.result) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Revoke token response does not contain a successful result.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoSendResetEmailResponse } from '../models/public_api';\n\nexport const validateSendResetEmailResponse = (response: ApolloQueryResult<MagentoSendResetEmailResponse>) => {\n if (response.data.requestPasswordResetEmail) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The reset password email was not sent successfully.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoResetPasswordResponse } from '../models/public_api';\n\nexport const validateResetPasswordResponse = (response: ApolloQueryResult<MagentoResetPasswordResponse>) => {\n if (response.data.resetPassword) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The password was not reset.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n checkTokenQuery,\n MagentoCheckTokenResponse,\n} from './queries/public_api';\nimport { validateCheckTokenResponse } from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthService implements DaffAuthServiceInterface {\n constructor(private apollo: Apollo) {}\n\n check(): Observable<void> {\n return this.apollo.query<MagentoCheckTokenResponse>({\n query: checkTokenQuery,\n fetchPolicy: 'no-cache',\n }).pipe(\n map(validateCheckTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffAuthToken } from '@daffodil/auth';\n\nimport { MagentoAuth } from '../models/response/auth';\n\n/**\n * Transforms magento auths into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthTransformerService {\n\n /**\n * Transforms the magento AuthNode from the magento auth query into a DaffAuthToken.\n *\n * @param auth the auth from a magento auth query.\n */\n transform(auth: MagentoAuth): DaffAuthToken {\n return {\n token: auth.token,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n MagentoRevokeCustomerTokenResponse,\n MagentoGenerateTokenResponse,\n generateTokenMutation,\n revokeCustomerTokenMutation,\n} from './queries/public_api';\nimport { DaffMagentoAuthTransformerService } from './transforms/auth-transformer.service';\nimport {\n validateRevokeTokenResponse,\n validateGenerateTokenResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoLoginService implements DaffLoginServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n public authTransformer: DaffMagentoAuthTransformerService,\n ) {}\n\n login({ email, password }: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.apollo.mutate<MagentoGenerateTokenResponse>({\n mutation: generateTokenMutation,\n variables: {\n email,\n password,\n },\n }).pipe(\n map(validateGenerateTokenResponse),\n map(res => this.authTransformer.transform(res.data.generateCustomerToken)),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n logout() {\n return this.apollo.mutate<MagentoRevokeCustomerTokenResponse>({ mutation: revokeCustomerTokenMutation }).pipe(\n map(validateRevokeTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport {\n DaffRegisterServiceInterface,\n DaffRegistrationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport { MagentoRegisterResponse } from './models/public_api';\nimport { createCustomerMutation } from './queries/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly({ email, password, subscribe, firstName, lastName }: DaffAccountRegistration): Observable<void> {\n return this.apollo.mutate<MagentoRegisterResponse>({\n mutation: createCustomerMutation,\n variables: {\n email,\n password,\n firstname: firstName || 'temp',\n lastname: lastName || 'temp',\n subscribe,\n },\n }).pipe(\n map((resp) => {\n if (!resp.data.createCustomerV2.customer.email) {\n throw new DaffRegistrationFailedError(`The account for email ${email} was not successful.`);\n }\n\n return;\n }),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport {\n MagentoResetPasswordResponse,\n MagentoSendResetEmailResponse,\n} from './models/public_api';\nimport {\n resetPasswordMutation,\n sendPasswordResetEmailMutation,\n} from './queries/public_api';\nimport {\n validateResetPasswordResponse,\n validateSendResetEmailResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly({ email, password, token }: DaffAuthResetPasswordInfo): Observable<void> {\n return this.apollo.mutate<MagentoResetPasswordResponse>({\n mutation: resetPasswordMutation,\n variables: {\n email,\n password,\n token,\n },\n }).pipe(\n map(validateResetPasswordResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.apollo.mutate<MagentoSendResetEmailResponse>({\n mutation: sendPasswordResetEmailMutation,\n variables: {\n email,\n },\n }).pipe(\n map(validateSendResetEmailResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n DaffRegisterDriver,\n DaffLoginDriver,\n DaffAuthDriver,\n DaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffMagentoAuthService } from './auth.service';\nimport { DaffMagentoLoginService } from './login.service';\nimport { DaffMagentoRegisterService } from './register.service';\nimport { DaffMagentoResetPasswordService } from './reset-password.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthMagentoDriverModule> {\n return {\n ngModule: DaffAuthMagentoDriverModule,\n providers: [\n {\n provide: DaffRegisterDriver,\n useExisting: DaffMagentoRegisterService,\n },\n {\n provide: DaffLoginDriver,\n useExisting: DaffMagentoLoginService,\n },\n {\n provide: DaffAuthDriver,\n useExisting: DaffMagentoAuthService,\n },\n {\n provide: DaffResetPasswordDriver,\n useExisting: DaffMagentoResetPasswordService,\n },\n ],\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport { DaffApolloLinkGenerator } from '@daffodil/core/graphql';\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoAuthApolloBearerTokenLinkGenerator implements DaffApolloLinkGenerator {\n constructor(\n private storage: DaffAuthStorageService,\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n const token = this.storage.getAuthToken();\n if (token) {\n operation.setContext({\n headers: {\n ...operation.getContext().headers,\n authorization: `Bearer ${token}`,\n },\n });\n }\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.DaffMagentoAuthTransformerService","i2.DaffMagentoLoginService"],"mappings":";;;;;;;;;;;;;;AAAA,IAAY,2BAIX,CAAA;AAJD,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,cAAA,CAAA,GAAA,uBAAsC,CAAA;AACtC,IAAA,2BAAA,CAAA,uBAAA,CAAA,GAAA,wBAAgD,CAAA;AAChD,IAAA,2BAAA,CAAA,WAAA,CAAA,GAAA,eAA2B,CAAA;AAC7B,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,GAItC,EAAA,CAAA,CAAA;;ACKM,MAAM,uBAAuB,GAAqB;AACvD,IAAA,CAAC,2BAA2B,CAAC,YAAY,GAAG,qBAAqB;AACjE,IAAA,CAAC,2BAA2B,CAAC,qBAAqB,GAAG,6BAA6B;AAClF,IAAA,CAAC,2BAA2B,CAAC,SAAS,GAAG,iBAAiB;CAC3D;;ACRM,MAAM,yBAAyB,GAAG,CAAC,KAAU,KAAY,yBAAyB,CAAC,KAAK,EAAE,uBAAuB,CAAC,IAAI,IAAI,+BAA+B,CAAC,KAAK,CAAC,OAAO,CAAC;;ACFxK,MAAM,eAAe,GAAG,GAAG,CAAA,CAAA;;;;;;;;ACA3B,MAAM,sBAAsB,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;ACAlC,MAAM,qBAAqB,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;;ACAjC,MAAM,2BAA2B,GAAG,GAAG,CAAA,CAAA;;;;;;;;ACAvC,M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EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzC,mBAAA,yCAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yCAAyC,cAFxC,MAAM,EAAA,CAAA,CAAA;2FAEP,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBAHrD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-auth-driver-magento.mjs","sources":["../../../libs/auth/driver/magento/src/errors/codes.ts","../../../libs/auth/driver/magento/src/errors/map.ts","../../../libs/auth/driver/magento/src/errors/transform.ts","../../../libs/auth/driver/magento/src/queries/check-token.ts","../../../libs/auth/driver/magento/src/queries/create-customer.ts","../../../libs/auth/driver/magento/src/queries/generate-token.ts","../../../libs/auth/driver/magento/src/queries/revoke-customer-token.ts","../../../libs/auth/driver/magento/src/queries/send-reset-email.ts","../../../libs/auth/driver/magento/src/queries/reset-password.ts","../../../libs/auth/driver/magento/src/validators/check-token.ts","../../../libs/auth/driver/magento/src/validators/generate-token.ts","../../../libs/auth/driver/magento/src/validators/revoke-token.ts","../../../libs/auth/driver/magento/src/validators/send-reset-email.ts","../../../libs/auth/driver/magento/src/validators/reset-password.ts","../../../libs/auth/driver/magento/src/auth.service.ts","../../../libs/auth/driver/magento/src/transforms/auth-transformer.service.ts","../../../libs/auth/driver/magento/src/login.service.ts","../../../libs/auth/driver/magento/src/register.service.ts","../../../libs/auth/driver/magento/src/reset-password.service.ts","../../../libs/auth/driver/magento/src/auth-driver.module.ts","../../../libs/auth/driver/magento/src/apollo-bearer-token-link-generator.ts","../../../libs/auth/driver/magento/src/daffodil-auth-driver-magento.ts"],"sourcesContent":["export enum MagentoAuthGraphQlErrorCode {\n UNAUTHORIZED = 'graphql-authorization',\n AUTHENTICATION_FAILED = 'graphql-authentication',\n BAD_INPUT = 'graphql-input'\n}\n","import {\n DaffUnauthorizedError,\n DaffAuthenticationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffBadInputError } from '@daffodil/driver';\n\nimport { MagentoAuthGraphQlErrorCode } from './codes';\n\nexport const DaffAuthMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoAuthGraphQlErrorCode.UNAUTHORIZED]: DaffUnauthorizedError,\n [MagentoAuthGraphQlErrorCode.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [MagentoAuthGraphQlErrorCode.BAD_INPUT]: DaffBadInputError,\n};\n","import { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffAuthMagentoErrorMap } from './map';\n\nexport const transformMagentoAuthError = (error: any): Error => daffTransformMagentoError(error, DaffAuthMagentoErrorMap) || new DaffAuthInvalidAPIResponseError(error.message);\n","import { gql } from 'apollo-angular';\n\n\nexport const checkTokenQuery = gql`\n query MagentoCheckToken {\n customer {\n email\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const createCustomerMutation = gql`\n mutation MagentoCreateCustomer(\n $email: String!,\n $password: String!,\n $subscribe: Boolean!,\n $firstname: String!,\n $lastname: String!,\n ) {\n createCustomerV2(input: {\n firstname: $firstname,\n lastname: $lastname,\n email: $email,\n password: $password,\n is_subscribed: $subscribe\n }) {\n customer {\n email\n }\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const generateTokenMutation = gql`\n mutation MagentoGenerateToken($email: String!, $password: String!) {\n generateCustomerToken(\n email: $email,\n password: $password\n ) {\n token\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const revokeCustomerTokenMutation = gql`\n mutation revokeCustomerToken {\n revokeCustomerToken {\n result\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const sendPasswordResetEmailMutation = gql`\n mutation MagentoSendPasswordResetEmail($email: String!) {\n requestPasswordResetEmail(\n email: $email,\n )\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const resetPasswordMutation = gql`\n mutation MagentoResetPassword($email: String!, $password: String!, $token: String!) {\n resetPassword(\n email: $email,\n newPassword: $password\n resetPasswordToken: $token\n )\n }\n`;\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoCheckTokenResponse } from '../queries/public_api';\n\nexport const validateCheckTokenResponse = (response: ApolloQueryResult<MagentoCheckTokenResponse>) => {\n if (response.data.customer.email) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Check token response does not contain a valid customer email.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoGenerateTokenResponse } from '../queries/public_api';\n\nexport const validateGenerateTokenResponse = (response: ApolloQueryResult<MagentoGenerateTokenResponse>) => {\n if (response.data.generateCustomerToken.token) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Generate token response does not contain an auth token.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoRevokeCustomerTokenResponse } from '../queries/public_api';\n\nexport const validateRevokeTokenResponse = (response: ApolloQueryResult<MagentoRevokeCustomerTokenResponse>) => {\n if (response.data.revokeCustomerToken.result) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Revoke token response does not contain a successful result.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoSendResetEmailResponse } from '../models/public_api';\n\nexport const validateSendResetEmailResponse = (response: ApolloQueryResult<MagentoSendResetEmailResponse>) => {\n if (response.data.requestPasswordResetEmail) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The reset password email was not sent successfully.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoResetPasswordResponse } from '../models/public_api';\n\nexport const validateResetPasswordResponse = (response: ApolloQueryResult<MagentoResetPasswordResponse>) => {\n if (response.data.resetPassword) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The password was not reset.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n checkTokenQuery,\n MagentoCheckTokenResponse,\n} from './queries/public_api';\nimport { validateCheckTokenResponse } from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthService implements DaffAuthServiceInterface {\n constructor(private apollo: Apollo) {}\n\n check(): Observable<void> {\n return this.apollo.query<MagentoCheckTokenResponse>({\n query: checkTokenQuery,\n fetchPolicy: 'no-cache',\n }).pipe(\n map(validateCheckTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffAuthToken } from '@daffodil/auth';\n\nimport { MagentoAuth } from '../models/response/auth';\n\n/**\n * Transforms magento auths into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthTransformerService {\n\n /**\n * Transforms the magento AuthNode from the magento auth query into a DaffAuthToken.\n *\n * @param auth the auth from a magento auth query.\n */\n transform(auth: MagentoAuth): DaffAuthToken {\n return {\n token: auth.token,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n MagentoRevokeCustomerTokenResponse,\n MagentoGenerateTokenResponse,\n generateTokenMutation,\n revokeCustomerTokenMutation,\n} from './queries/public_api';\nimport { DaffMagentoAuthTransformerService } from './transforms/auth-transformer.service';\nimport {\n validateRevokeTokenResponse,\n validateGenerateTokenResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoLoginService implements DaffLoginServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n public authTransformer: DaffMagentoAuthTransformerService,\n ) {}\n\n login({ email, password }: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.apollo.mutate<MagentoGenerateTokenResponse>({\n mutation: generateTokenMutation,\n variables: {\n email,\n password,\n },\n }).pipe(\n map(validateGenerateTokenResponse),\n map(res => this.authTransformer.transform(res.data.generateCustomerToken)),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n logout() {\n return this.apollo.mutate<MagentoRevokeCustomerTokenResponse>({ mutation: revokeCustomerTokenMutation }).pipe(\n map(validateRevokeTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport {\n DaffRegisterServiceInterface,\n DaffRegistrationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport { MagentoRegisterResponse } from './models/public_api';\nimport { createCustomerMutation } from './queries/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly({ email, password, subscribe, firstName, lastName }: DaffAccountRegistration): Observable<void> {\n return this.apollo.mutate<MagentoRegisterResponse>({\n mutation: createCustomerMutation,\n variables: {\n email,\n password,\n firstname: firstName || 'temp',\n lastname: lastName || 'temp',\n subscribe,\n },\n }).pipe(\n map((resp) => {\n if (!resp.data.createCustomerV2.customer.email) {\n throw new DaffRegistrationFailedError(`The account for email ${email} was not successful.`);\n }\n\n return;\n }),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport {\n MagentoResetPasswordResponse,\n MagentoSendResetEmailResponse,\n} from './models/public_api';\nimport {\n resetPasswordMutation,\n sendPasswordResetEmailMutation,\n} from './queries/public_api';\nimport {\n validateResetPasswordResponse,\n validateSendResetEmailResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly({ email, password, token }: DaffAuthResetPasswordInfo): Observable<void> {\n return this.apollo.mutate<MagentoResetPasswordResponse>({\n mutation: resetPasswordMutation,\n variables: {\n email,\n password,\n token,\n },\n }).pipe(\n map(validateResetPasswordResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.apollo.mutate<MagentoSendResetEmailResponse>({\n mutation: sendPasswordResetEmailMutation,\n variables: {\n email,\n },\n }).pipe(\n map(validateSendResetEmailResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n DaffRegisterDriver,\n DaffLoginDriver,\n DaffAuthDriver,\n DaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffMagentoAuthService } from './auth.service';\nimport { DaffMagentoLoginService } from './login.service';\nimport { DaffMagentoRegisterService } from './register.service';\nimport { DaffMagentoResetPasswordService } from './reset-password.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthMagentoDriverModule> {\n return {\n ngModule: DaffAuthMagentoDriverModule,\n providers: [\n {\n provide: DaffRegisterDriver,\n useExisting: DaffMagentoRegisterService,\n },\n {\n provide: DaffLoginDriver,\n useExisting: DaffMagentoLoginService,\n },\n {\n provide: DaffAuthDriver,\n useExisting: DaffMagentoAuthService,\n },\n {\n provide: DaffResetPasswordDriver,\n useExisting: DaffMagentoResetPasswordService,\n },\n ],\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport { DaffApolloLinkGenerator } from '@daffodil/core/graphql';\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoAuthApolloBearerTokenLinkGenerator implements DaffApolloLinkGenerator {\n constructor(\n private storage: DaffAuthStorageService,\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n let token = null;\n\n try {\n token = this.storage.getAuthToken();\n } catch(e){}\n\n if (token) {\n operation.setContext({\n headers: {\n ...operation.getContext().headers,\n authorization: `Bearer ${token}`,\n },\n });\n }\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.DaffMagentoAuthTransformerService","i2.DaffMagentoLoginService"],"mappings":";;;;;;;;;;;;;;AAAA,IAAY,2BAIX,CAAA;AAJD,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,cAAA,CAAA,GAAA,uBAAsC,CAAA;AACtC,IAAA,2BAAA,CAAA,uBAAA,CAAA,GAAA,wBAAgD,CAAA;AAChD,IAAA,2BAAA,CAAA,WAAA,CAAA,GAAA,eAA2B,CAAA;AAC7B,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,GAItC,EAAA,CAAA,CAAA;;ACKM,MAAM,uBAAuB,GAAqB;AACvD,IAAA,CAAC,2BAA2B,CAAC,YAAY,GAAG,qBAAqB;AACjE,IAAA,CAAC,2BAA2B,CAAC,qBAAqB,GAAG,6BAA6B;AAClF,IAAA,CAAC,2BAA2B,CAAC,SAAS,GAAG,iBAAiB;CAC3D;;ACRM,MAAM,yBAAyB,GAAG,CAAC,KAAU,KAAY,yBAAyB,CAAC,KAA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AS,CAAC,UAAU,CAAC;AACnB,oBAAA,OAAO,EACF,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,SAAS,CAAC,UAAU,EAAE,CAAC,OAAO,CAAA,EAAA,EACjC,aAAa,EAAE,CAAU,OAAA,EAAA,KAAK,EAAE,EACjC,CAAA;AACF,iBAAA,CAAC,CAAC;AACJ,aAAA;AACD,YAAA,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;AAC5B,SAAC,CAAC,CAAC;KACJ;;yJAvBU,yCAAyC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAF,IAAA,CAAA,sBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzC,mBAAA,yCAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yCAAyC,cAFxC,MAAM,EAAA,CAAA,CAAA;2FAEP,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBAHrD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -10,6 +10,7 @@ import * as i2 from '@daffodil/auth';
|
|
|
10
10
|
import { DAFF_AUTH_ERROR_MATCHER } from '@daffodil/auth';
|
|
11
11
|
import { DaffAuthDriver, DaffLoginDriver, DaffRegisterDriver, DaffResetPasswordDriver } from '@daffodil/auth/driver';
|
|
12
12
|
import { DaffStorageServiceError, DaffServerSideStorageError } from '@daffodil/core';
|
|
13
|
+
import * as i2$1 from '@angular/router';
|
|
13
14
|
|
|
14
15
|
var DaffAuthActionTypes;
|
|
15
16
|
(function (DaffAuthActionTypes) {
|
|
@@ -550,6 +551,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
550
551
|
const TWENTY_MINUTES = 1.2e6;
|
|
551
552
|
const daffAuthStateDefaultConfig = {
|
|
552
553
|
checkInterval: TWENTY_MINUTES,
|
|
554
|
+
authCompleteRedirectPath: '/',
|
|
555
|
+
logoutRedirectPath: '/',
|
|
553
556
|
};
|
|
554
557
|
|
|
555
558
|
const DAFF_AUTH_STATE_CONFIG = new InjectionToken('DAFF_AUTH_STATE_CONFIG', { factory: () => daffAuthStateDefaultConfig });
|
|
@@ -660,6 +663,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
660
663
|
}] }, { type: i2.DaffAuthStorageService }];
|
|
661
664
|
} });
|
|
662
665
|
|
|
666
|
+
/**
|
|
667
|
+
* Redirects the user to certain pages based on certain auth actions.
|
|
668
|
+
*/
|
|
669
|
+
class DaffAuthRedirectEffects {
|
|
670
|
+
constructor(actions$, router, config) {
|
|
671
|
+
this.actions$ = actions$;
|
|
672
|
+
this.router = router;
|
|
673
|
+
this.config = config;
|
|
674
|
+
this.redirectAfterLoginOrRegister$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthActionTypes.AuthCompleteAction), tap(() => {
|
|
675
|
+
this.router.navigateByUrl(this.config.authCompleteRedirectPath);
|
|
676
|
+
}), switchMap(() => EMPTY)), { dispatch: false });
|
|
677
|
+
this.redirectAfterLogout$ = createEffect(() => this.actions$.pipe(ofType(DaffAuthLoginActionTypes.LogoutSuccessAction), tap(() => {
|
|
678
|
+
this.router.navigateByUrl(this.config.logoutRedirectPath);
|
|
679
|
+
}), switchMap(() => EMPTY)), { dispatch: false });
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
/** @nocollapse */ DaffAuthRedirectEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects, deps: [{ token: i1$1.Actions }, { token: i2$1.Router }, { token: DAFF_AUTH_STATE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
683
|
+
/** @nocollapse */ DaffAuthRedirectEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects });
|
|
684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthRedirectEffects, decorators: [{
|
|
685
|
+
type: Injectable
|
|
686
|
+
}], ctorParameters: function () {
|
|
687
|
+
return [{ type: i1$1.Actions }, { type: i2$1.Router }, { type: undefined, decorators: [{
|
|
688
|
+
type: Inject,
|
|
689
|
+
args: [DAFF_AUTH_STATE_CONFIG]
|
|
690
|
+
}] }];
|
|
691
|
+
} });
|
|
692
|
+
|
|
663
693
|
class DaffAuthRegisterEffects {
|
|
664
694
|
constructor(actions$, registerDriver, errorMatcher, storage) {
|
|
665
695
|
this.actions$ = actions$;
|
|
@@ -726,11 +756,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
726
756
|
} });
|
|
727
757
|
|
|
728
758
|
class DaffAuthStateModule {
|
|
729
|
-
static withConfig(config) {
|
|
759
|
+
static withConfig(config = {}) {
|
|
730
760
|
return {
|
|
731
761
|
ngModule: DaffAuthStateModule,
|
|
732
762
|
providers: [
|
|
733
|
-
provideDaffAuthStateConfig(config),
|
|
763
|
+
provideDaffAuthStateConfig(Object.assign(Object.assign({}, daffAuthStateDefaultConfig), config)),
|
|
734
764
|
],
|
|
735
765
|
};
|
|
736
766
|
}
|
|
@@ -744,6 +774,7 @@ class DaffAuthStateModule {
|
|
|
744
774
|
DaffAuthLoginEffects,
|
|
745
775
|
DaffAuthRegisterEffects,
|
|
746
776
|
DaffAuthResetPasswordEffects,
|
|
777
|
+
DaffAuthRedirectEffects,
|
|
747
778
|
]),
|
|
748
779
|
]] });
|
|
749
780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAuthStateModule, decorators: [{
|
|
@@ -756,6 +787,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
756
787
|
DaffAuthLoginEffects,
|
|
757
788
|
DaffAuthRegisterEffects,
|
|
758
789
|
DaffAuthResetPasswordEffects,
|
|
790
|
+
DaffAuthRedirectEffects,
|
|
759
791
|
]),
|
|
760
792
|
],
|
|
761
793
|
}]
|