@rxap/oauth 12.0.9 → 13.0.0-next.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/_theming.scss +1 -1
- package/esm2020/index.mjs +17 -0
- package/esm2020/lib/container/container.component.mjs +38 -0
- package/esm2020/lib/container/container.component.module.mjs +22 -0
- package/esm2020/lib/get-o-auth-profile.method.mjs +40 -0
- package/esm2020/lib/loading/loading.component.mjs +12 -0
- package/esm2020/lib/loading/loading.component.module.mjs +26 -0
- package/esm2020/lib/o-auth-extract.guard.mjs +55 -0
- package/esm2020/lib/o-auth-redirect.guard.mjs +31 -0
- package/esm2020/lib/o-auth-routing.module.mjs +25 -0
- package/esm2020/lib/o-auth.method.mjs +111 -0
- package/esm2020/lib/o-auth.module.mjs +27 -0
- package/esm2020/lib/o-auth.service.mjs +303 -0
- package/esm2020/lib/profile.resolve.mjs +37 -0
- package/esm2020/lib/routes.mjs +26 -0
- package/esm2020/lib/sign-in-with-redirect/sign-in-with-redirect.component.mjs +47 -0
- package/esm2020/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.mjs +38 -0
- package/esm2020/lib/tokens.mjs +17 -0
- package/esm2020/rxap-oauth.mjs +5 -0
- package/esm2020/single-sign-on/lib/continue/continue.component.mjs +70 -0
- package/esm2020/single-sign-on/lib/continue/continue.component.module.mjs +42 -0
- package/esm2020/single-sign-on/lib/error/error.component.mjs +44 -0
- package/esm2020/single-sign-on/lib/error/error.component.module.mjs +30 -0
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on-routing.module.mjs +50 -0
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on.guard.mjs +69 -0
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on.service.mjs +77 -0
- package/esm2020/single-sign-on/lib/routes.mjs +33 -0
- package/esm2020/single-sign-on/lib/tokens.mjs +10 -0
- package/esm2020/single-sign-on/public_api.mjs +10 -0
- package/esm2020/single-sign-on/rxap-oauth-single-sign-on.mjs +5 -0
- package/fesm2015/rxap-oauth-single-sign-on.mjs +408 -0
- package/fesm2015/rxap-oauth-single-sign-on.mjs.map +1 -0
- package/fesm2015/{rxap-oauth.js → rxap-oauth.mjs} +131 -141
- package/fesm2015/rxap-oauth.mjs.map +1 -0
- package/{fesm2015/rxap-oauth-single-sign-on.js → fesm2020/rxap-oauth-single-sign-on.mjs} +65 -89
- package/fesm2020/rxap-oauth-single-sign-on.mjs.map +1 -0
- package/fesm2020/rxap-oauth.mjs +801 -0
- package/fesm2020/rxap-oauth.mjs.map +1 -0
- package/package.json +41 -19
- package/single-sign-on/package.json +5 -5
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
- package/bundles/rxap-oauth-single-sign-on.umd.js +0 -813
- package/bundles/rxap-oauth-single-sign-on.umd.js.map +0 -1
- package/bundles/rxap-oauth.umd.js +0 -1349
- package/bundles/rxap-oauth.umd.js.map +0 -1
- package/esm2015/index.js +0 -17
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/container/container.component.js +0 -45
- package/esm2015/lib/container/container.component.js.map +0 -1
- package/esm2015/lib/container/container.component.module.js +0 -22
- package/esm2015/lib/container/container.component.module.js.map +0 -1
- package/esm2015/lib/get-o-auth-profile.method.js +0 -41
- package/esm2015/lib/get-o-auth-profile.method.js.map +0 -1
- package/esm2015/lib/loading/loading.component.js +0 -18
- package/esm2015/lib/loading/loading.component.js.map +0 -1
- package/esm2015/lib/loading/loading.component.module.js +0 -26
- package/esm2015/lib/loading/loading.component.module.js.map +0 -1
- package/esm2015/lib/o-auth-extract.guard.js +0 -55
- package/esm2015/lib/o-auth-extract.guard.js.map +0 -1
- package/esm2015/lib/o-auth-redirect.guard.js +0 -34
- package/esm2015/lib/o-auth-redirect.guard.js.map +0 -1
- package/esm2015/lib/o-auth-routing.module.js +0 -25
- package/esm2015/lib/o-auth-routing.module.js.map +0 -1
- package/esm2015/lib/o-auth.method.js +0 -115
- package/esm2015/lib/o-auth.method.js.map +0 -1
- package/esm2015/lib/o-auth.module.js +0 -28
- package/esm2015/lib/o-auth.module.js.map +0 -1
- package/esm2015/lib/o-auth.service.js +0 -317
- package/esm2015/lib/o-auth.service.js.map +0 -1
- package/esm2015/lib/profile.resolve.js +0 -40
- package/esm2015/lib/profile.resolve.js.map +0 -1
- package/esm2015/lib/routes.js +0 -26
- package/esm2015/lib/routes.js.map +0 -1
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.js +0 -54
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.js.map +0 -1
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.js +0 -38
- package/esm2015/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.js.map +0 -1
- package/esm2015/lib/tokens.js +0 -17
- package/esm2015/lib/tokens.js.map +0 -1
- package/esm2015/rxap-oauth.js +0 -5
- package/esm2015/rxap-oauth.js.map +0 -1
- package/esm2015/single-sign-on/lib/continue/continue.component.js +0 -77
- package/esm2015/single-sign-on/lib/continue/continue.component.js.map +0 -1
- package/esm2015/single-sign-on/lib/continue/continue.component.module.js +0 -42
- package/esm2015/single-sign-on/lib/continue/continue.component.module.js.map +0 -1
- package/esm2015/single-sign-on/lib/error/error.component.js +0 -51
- package/esm2015/single-sign-on/lib/error/error.component.js.map +0 -1
- package/esm2015/single-sign-on/lib/error/error.component.module.js +0 -30
- package/esm2015/single-sign-on/lib/error/error.component.module.js.map +0 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on-routing.module.js +0 -50
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on-routing.module.js.map +0 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.guard.js +0 -72
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.guard.js.map +0 -1
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.service.js +0 -85
- package/esm2015/single-sign-on/lib/o-auth-single-sign-on.service.js.map +0 -1
- package/esm2015/single-sign-on/lib/routes.js +0 -33
- package/esm2015/single-sign-on/lib/routes.js.map +0 -1
- package/esm2015/single-sign-on/lib/tokens.js +0 -10
- package/esm2015/single-sign-on/lib/tokens.js.map +0 -1
- package/esm2015/single-sign-on/public_api.js +0 -10
- package/esm2015/single-sign-on/public_api.js.map +0 -1
- package/esm2015/single-sign-on/rxap-oauth-single-sign-on.js +0 -5
- package/esm2015/single-sign-on/rxap-oauth-single-sign-on.js.map +0 -1
- package/fesm2015/rxap-oauth-single-sign-on.js.map +0 -1
- package/fesm2015/rxap-oauth.js.map +0 -1
|
@@ -1,1349 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@angular/router'), require('@angular/animations'), require('@angular/material/progress-bar'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/flex-layout/flex'), require('@angular/common'), require('@angular/material/card'), require('@angular/flex-layout')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@rxap/oauth', ['exports', '@angular/core', '@angular/common/http', '@angular/router', '@angular/animations', '@angular/material/progress-bar', '@angular/material/icon', '@angular/material/button', '@angular/flex-layout/flex', '@angular/common', '@angular/material/card', '@angular/flex-layout'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap.oauth = {}), global.ng.core, global.ng.common.http, global.ng.router, global.ng.animations, global.ng.material.progressBar, global.ng.material.icon, global.ng.material.button, global.ng.flexLayout.flex, global.ng.common, global.ng.material.card, global.ng.flexLayout));
|
|
5
|
-
}(this, (function (exports, i0, i1, i1$1, animations, i1$2, i2, i3, i4, common, card, flexLayout) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n['default'] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
31
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
32
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
33
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
34
|
-
|
|
35
|
-
var PROFILE_AUTH_ENDPOINT = new i0.InjectionToken('PROFILE_AUTH_ENDPOINT');
|
|
36
|
-
var GetOAuthProfileMethod = /** @class */ (function () {
|
|
37
|
-
function GetOAuthProfileMethod(http, profileEndpoint) {
|
|
38
|
-
if (profileEndpoint === void 0) { profileEndpoint = null; }
|
|
39
|
-
this.http = http;
|
|
40
|
-
this.profileEndpoint = profileEndpoint;
|
|
41
|
-
}
|
|
42
|
-
GetOAuthProfileMethod.prototype.call = function (parameters) {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
var profileEndpoint = (_a = parameters.profileEndpoint) !== null && _a !== void 0 ? _a : this.profileEndpoint;
|
|
45
|
-
if (!profileEndpoint) {
|
|
46
|
-
throw new Error('The profile endpoint is not defined');
|
|
47
|
-
}
|
|
48
|
-
return this.http
|
|
49
|
-
.get(profileEndpoint, {
|
|
50
|
-
headers: {
|
|
51
|
-
Authorization: "Bearer " + parameters.accessToken,
|
|
52
|
-
},
|
|
53
|
-
withCredentials: (_b = parameters.withCredentials) !== null && _b !== void 0 ? _b : true,
|
|
54
|
-
})
|
|
55
|
-
.toPromise();
|
|
56
|
-
};
|
|
57
|
-
return GetOAuthProfileMethod;
|
|
58
|
-
}());
|
|
59
|
-
GetOAuthProfileMethod.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: GetOAuthProfileMethod, deps: [{ token: i1.HttpClient }, { token: PROFILE_AUTH_ENDPOINT, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
60
|
-
GetOAuthProfileMethod.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: GetOAuthProfileMethod, providedIn: 'root' });
|
|
61
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: GetOAuthProfileMethod, decorators: [{
|
|
62
|
-
type: i0.Injectable,
|
|
63
|
-
args: [{ providedIn: 'root' }]
|
|
64
|
-
}], ctorParameters: function () {
|
|
65
|
-
return [{ type: i1__namespace.HttpClient, decorators: [{
|
|
66
|
-
type: i0.Inject,
|
|
67
|
-
args: [i1.HttpClient]
|
|
68
|
-
}] }, { type: undefined, decorators: [{
|
|
69
|
-
type: i0.Optional
|
|
70
|
-
}, {
|
|
71
|
-
type: i0.Inject,
|
|
72
|
-
args: [PROFILE_AUTH_ENDPOINT]
|
|
73
|
-
}] }];
|
|
74
|
-
} });
|
|
75
|
-
|
|
76
|
-
/*! *****************************************************************************
|
|
77
|
-
Copyright (c) Microsoft Corporation.
|
|
78
|
-
|
|
79
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
80
|
-
purpose with or without fee is hereby granted.
|
|
81
|
-
|
|
82
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
83
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
84
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
85
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
86
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
87
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
88
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
89
|
-
***************************************************************************** */
|
|
90
|
-
/* global Reflect, Promise */
|
|
91
|
-
var extendStatics = function (d, b) {
|
|
92
|
-
extendStatics = Object.setPrototypeOf ||
|
|
93
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
94
|
-
function (d, b) { for (var p in b)
|
|
95
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
96
|
-
d[p] = b[p]; };
|
|
97
|
-
return extendStatics(d, b);
|
|
98
|
-
};
|
|
99
|
-
function __extends(d, b) {
|
|
100
|
-
if (typeof b !== "function" && b !== null)
|
|
101
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
102
|
-
extendStatics(d, b);
|
|
103
|
-
function __() { this.constructor = d; }
|
|
104
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
105
|
-
}
|
|
106
|
-
var __assign = function () {
|
|
107
|
-
__assign = Object.assign || function __assign(t) {
|
|
108
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
109
|
-
s = arguments[i];
|
|
110
|
-
for (var p in s)
|
|
111
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
112
|
-
t[p] = s[p];
|
|
113
|
-
}
|
|
114
|
-
return t;
|
|
115
|
-
};
|
|
116
|
-
return __assign.apply(this, arguments);
|
|
117
|
-
};
|
|
118
|
-
function __rest(s, e) {
|
|
119
|
-
var t = {};
|
|
120
|
-
for (var p in s)
|
|
121
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
122
|
-
t[p] = s[p];
|
|
123
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
124
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
125
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
126
|
-
t[p[i]] = s[p[i]];
|
|
127
|
-
}
|
|
128
|
-
return t;
|
|
129
|
-
}
|
|
130
|
-
function __decorate(decorators, target, key, desc) {
|
|
131
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
132
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
133
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
134
|
-
else
|
|
135
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
136
|
-
if (d = decorators[i])
|
|
137
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
138
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
139
|
-
}
|
|
140
|
-
function __param(paramIndex, decorator) {
|
|
141
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
142
|
-
}
|
|
143
|
-
function __metadata(metadataKey, metadataValue) {
|
|
144
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
145
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
146
|
-
}
|
|
147
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
148
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
149
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
150
|
-
function fulfilled(value) { try {
|
|
151
|
-
step(generator.next(value));
|
|
152
|
-
}
|
|
153
|
-
catch (e) {
|
|
154
|
-
reject(e);
|
|
155
|
-
} }
|
|
156
|
-
function rejected(value) { try {
|
|
157
|
-
step(generator["throw"](value));
|
|
158
|
-
}
|
|
159
|
-
catch (e) {
|
|
160
|
-
reject(e);
|
|
161
|
-
} }
|
|
162
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
163
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
function __generator(thisArg, body) {
|
|
167
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
168
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
169
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
170
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
171
|
-
function step(op) {
|
|
172
|
-
if (f)
|
|
173
|
-
throw new TypeError("Generator is already executing.");
|
|
174
|
-
while (_)
|
|
175
|
-
try {
|
|
176
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
177
|
-
return t;
|
|
178
|
-
if (y = 0, t)
|
|
179
|
-
op = [op[0] & 2, t.value];
|
|
180
|
-
switch (op[0]) {
|
|
181
|
-
case 0:
|
|
182
|
-
case 1:
|
|
183
|
-
t = op;
|
|
184
|
-
break;
|
|
185
|
-
case 4:
|
|
186
|
-
_.label++;
|
|
187
|
-
return { value: op[1], done: false };
|
|
188
|
-
case 5:
|
|
189
|
-
_.label++;
|
|
190
|
-
y = op[1];
|
|
191
|
-
op = [0];
|
|
192
|
-
continue;
|
|
193
|
-
case 7:
|
|
194
|
-
op = _.ops.pop();
|
|
195
|
-
_.trys.pop();
|
|
196
|
-
continue;
|
|
197
|
-
default:
|
|
198
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
199
|
-
_ = 0;
|
|
200
|
-
continue;
|
|
201
|
-
}
|
|
202
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
203
|
-
_.label = op[1];
|
|
204
|
-
break;
|
|
205
|
-
}
|
|
206
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
207
|
-
_.label = t[1];
|
|
208
|
-
t = op;
|
|
209
|
-
break;
|
|
210
|
-
}
|
|
211
|
-
if (t && _.label < t[2]) {
|
|
212
|
-
_.label = t[2];
|
|
213
|
-
_.ops.push(op);
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
216
|
-
if (t[2])
|
|
217
|
-
_.ops.pop();
|
|
218
|
-
_.trys.pop();
|
|
219
|
-
continue;
|
|
220
|
-
}
|
|
221
|
-
op = body.call(thisArg, _);
|
|
222
|
-
}
|
|
223
|
-
catch (e) {
|
|
224
|
-
op = [6, e];
|
|
225
|
-
y = 0;
|
|
226
|
-
}
|
|
227
|
-
finally {
|
|
228
|
-
f = t = 0;
|
|
229
|
-
}
|
|
230
|
-
if (op[0] & 5)
|
|
231
|
-
throw op[1];
|
|
232
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
236
|
-
if (k2 === undefined)
|
|
237
|
-
k2 = k;
|
|
238
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
239
|
-
}) : (function (o, m, k, k2) {
|
|
240
|
-
if (k2 === undefined)
|
|
241
|
-
k2 = k;
|
|
242
|
-
o[k2] = m[k];
|
|
243
|
-
});
|
|
244
|
-
function __exportStar(m, o) {
|
|
245
|
-
for (var p in m)
|
|
246
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
247
|
-
__createBinding(o, m, p);
|
|
248
|
-
}
|
|
249
|
-
function __values(o) {
|
|
250
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
251
|
-
if (m)
|
|
252
|
-
return m.call(o);
|
|
253
|
-
if (o && typeof o.length === "number")
|
|
254
|
-
return {
|
|
255
|
-
next: function () {
|
|
256
|
-
if (o && i >= o.length)
|
|
257
|
-
o = void 0;
|
|
258
|
-
return { value: o && o[i++], done: !o };
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
262
|
-
}
|
|
263
|
-
function __read(o, n) {
|
|
264
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
265
|
-
if (!m)
|
|
266
|
-
return o;
|
|
267
|
-
var i = m.call(o), r, ar = [], e;
|
|
268
|
-
try {
|
|
269
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
270
|
-
ar.push(r.value);
|
|
271
|
-
}
|
|
272
|
-
catch (error) {
|
|
273
|
-
e = { error: error };
|
|
274
|
-
}
|
|
275
|
-
finally {
|
|
276
|
-
try {
|
|
277
|
-
if (r && !r.done && (m = i["return"]))
|
|
278
|
-
m.call(i);
|
|
279
|
-
}
|
|
280
|
-
finally {
|
|
281
|
-
if (e)
|
|
282
|
-
throw e.error;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
return ar;
|
|
286
|
-
}
|
|
287
|
-
/** @deprecated */
|
|
288
|
-
function __spread() {
|
|
289
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
290
|
-
ar = ar.concat(__read(arguments[i]));
|
|
291
|
-
return ar;
|
|
292
|
-
}
|
|
293
|
-
/** @deprecated */
|
|
294
|
-
function __spreadArrays() {
|
|
295
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
296
|
-
s += arguments[i].length;
|
|
297
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
298
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
299
|
-
r[k] = a[j];
|
|
300
|
-
return r;
|
|
301
|
-
}
|
|
302
|
-
function __spreadArray(to, from) {
|
|
303
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
304
|
-
to[j] = from[i];
|
|
305
|
-
return to;
|
|
306
|
-
}
|
|
307
|
-
function __await(v) {
|
|
308
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
309
|
-
}
|
|
310
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
311
|
-
if (!Symbol.asyncIterator)
|
|
312
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
313
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
314
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
315
|
-
function verb(n) { if (g[n])
|
|
316
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
317
|
-
function resume(n, v) { try {
|
|
318
|
-
step(g[n](v));
|
|
319
|
-
}
|
|
320
|
-
catch (e) {
|
|
321
|
-
settle(q[0][3], e);
|
|
322
|
-
} }
|
|
323
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
324
|
-
function fulfill(value) { resume("next", value); }
|
|
325
|
-
function reject(value) { resume("throw", value); }
|
|
326
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
327
|
-
resume(q[0][0], q[0][1]); }
|
|
328
|
-
}
|
|
329
|
-
function __asyncDelegator(o) {
|
|
330
|
-
var i, p;
|
|
331
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
332
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
333
|
-
}
|
|
334
|
-
function __asyncValues(o) {
|
|
335
|
-
if (!Symbol.asyncIterator)
|
|
336
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
337
|
-
var m = o[Symbol.asyncIterator], i;
|
|
338
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
339
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
340
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
341
|
-
}
|
|
342
|
-
function __makeTemplateObject(cooked, raw) {
|
|
343
|
-
if (Object.defineProperty) {
|
|
344
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
345
|
-
}
|
|
346
|
-
else {
|
|
347
|
-
cooked.raw = raw;
|
|
348
|
-
}
|
|
349
|
-
return cooked;
|
|
350
|
-
}
|
|
351
|
-
;
|
|
352
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
353
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
354
|
-
}) : function (o, v) {
|
|
355
|
-
o["default"] = v;
|
|
356
|
-
};
|
|
357
|
-
function __importStar(mod) {
|
|
358
|
-
if (mod && mod.__esModule)
|
|
359
|
-
return mod;
|
|
360
|
-
var result = {};
|
|
361
|
-
if (mod != null)
|
|
362
|
-
for (var k in mod)
|
|
363
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
364
|
-
__createBinding(result, mod, k);
|
|
365
|
-
__setModuleDefault(result, mod);
|
|
366
|
-
return result;
|
|
367
|
-
}
|
|
368
|
-
function __importDefault(mod) {
|
|
369
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
370
|
-
}
|
|
371
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
372
|
-
if (kind === "a" && !f)
|
|
373
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
374
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
375
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
376
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
377
|
-
}
|
|
378
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
379
|
-
if (kind === "m")
|
|
380
|
-
throw new TypeError("Private method is not writable");
|
|
381
|
-
if (kind === "a" && !f)
|
|
382
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
383
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
384
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
385
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
function IsOAuthMethodWithRefreshTokenParameters(parameters) {
|
|
389
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
390
|
-
return parameters.hasOwnProperty('refreshToken');
|
|
391
|
-
}
|
|
392
|
-
function IsOAuthMethodWithUsernamePasswordParameters(parameters) {
|
|
393
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
394
|
-
return (parameters.hasOwnProperty('username') &&
|
|
395
|
-
parameters.hasOwnProperty('password'));
|
|
396
|
-
}
|
|
397
|
-
function AssertOAuthMethodWithUsernamePasswordParameters(parameters) {
|
|
398
|
-
if (!IsOAuthMethodWithUsernamePasswordParameters(parameters)) {
|
|
399
|
-
throw new Error('The grant type password requires the parameters username and password');
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
function AssertOAuthMethodWithRefreshTokenParameters(parameters) {
|
|
403
|
-
if (!IsOAuthMethodWithRefreshTokenParameters(parameters)) {
|
|
404
|
-
throw new Error('The grant type refresh token requires the parameters refreshToken');
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
function AssertOAuthMethodParameters(parameters) {
|
|
408
|
-
if (!parameters.authEndpoint) {
|
|
409
|
-
throw new Error('The authEndpoint parameter must be defined');
|
|
410
|
-
}
|
|
411
|
-
if (!parameters.secret) {
|
|
412
|
-
throw new Error('The secret parameter must be defined');
|
|
413
|
-
}
|
|
414
|
-
if (parameters.grantType) {
|
|
415
|
-
switch (parameters.grantType) {
|
|
416
|
-
case 'password':
|
|
417
|
-
AssertOAuthMethodWithUsernamePasswordParameters(parameters);
|
|
418
|
-
break;
|
|
419
|
-
case 'refresh_token':
|
|
420
|
-
AssertOAuthMethodWithRefreshTokenParameters(parameters);
|
|
421
|
-
break;
|
|
422
|
-
default:
|
|
423
|
-
throw new Error("The grant type '" + parameters.grantType + "' is not supported");
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
if (!IsOAuthMethodWithRefreshTokenParameters(parameters) &&
|
|
428
|
-
!IsOAuthMethodWithUsernamePasswordParameters(parameters)) {
|
|
429
|
-
throw new Error('Either the refresh token or the username and password must be defined');
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
var OAuthMethod = /** @class */ (function () {
|
|
434
|
-
function OAuthMethod(http) {
|
|
435
|
-
this.http = http;
|
|
436
|
-
}
|
|
437
|
-
OAuthMethod.prototype.call = function (parameters) {
|
|
438
|
-
var _a;
|
|
439
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
440
|
-
var params, grantType, headers, response;
|
|
441
|
-
return __generator(this, function (_b) {
|
|
442
|
-
switch (_b.label) {
|
|
443
|
-
case 0:
|
|
444
|
-
AssertOAuthMethodParameters(parameters);
|
|
445
|
-
params = new URLSearchParams();
|
|
446
|
-
grantType = this.getGrantType(parameters);
|
|
447
|
-
params.append('grant_type', grantType);
|
|
448
|
-
switch (grantType) {
|
|
449
|
-
case 'password':
|
|
450
|
-
AssertOAuthMethodWithUsernamePasswordParameters(parameters);
|
|
451
|
-
params.append('username', parameters.username);
|
|
452
|
-
params.append('password', parameters.password);
|
|
453
|
-
break;
|
|
454
|
-
case 'refresh_token':
|
|
455
|
-
AssertOAuthMethodWithRefreshTokenParameters(parameters);
|
|
456
|
-
params.append('refresh_token', parameters.refreshToken);
|
|
457
|
-
break;
|
|
458
|
-
default:
|
|
459
|
-
throw new Error('Not supported grant type');
|
|
460
|
-
}
|
|
461
|
-
headers = new i1.HttpHeaders({
|
|
462
|
-
'Content-type': 'application/x-www-form-urlencoded; charset=utf-8',
|
|
463
|
-
Authorization: "Basic " + parameters.secret,
|
|
464
|
-
});
|
|
465
|
-
return [4 /*yield*/, this.http
|
|
466
|
-
.post(parameters.authEndpoint, params.toString(), {
|
|
467
|
-
headers: headers,
|
|
468
|
-
withCredentials: (_a = parameters.withCredentials) !== null && _a !== void 0 ? _a : true,
|
|
469
|
-
})
|
|
470
|
-
.toPromise()];
|
|
471
|
-
case 1:
|
|
472
|
-
response = _b.sent();
|
|
473
|
-
return [2 /*return*/, {
|
|
474
|
-
accessToken: response.access_token,
|
|
475
|
-
refreshToken: response.refresh_token,
|
|
476
|
-
expiresIn: response.expires_in,
|
|
477
|
-
expiresAt: new Date(Date.now() + response.expires_in * 1000),
|
|
478
|
-
}];
|
|
479
|
-
}
|
|
480
|
-
});
|
|
481
|
-
});
|
|
482
|
-
};
|
|
483
|
-
OAuthMethod.prototype.getGrantType = function (parameters) {
|
|
484
|
-
if (parameters.grantType) {
|
|
485
|
-
return parameters.grantType;
|
|
486
|
-
}
|
|
487
|
-
if (IsOAuthMethodWithRefreshTokenParameters(parameters)) {
|
|
488
|
-
return 'refresh_token';
|
|
489
|
-
}
|
|
490
|
-
if (IsOAuthMethodWithUsernamePasswordParameters(parameters)) {
|
|
491
|
-
return 'password';
|
|
492
|
-
}
|
|
493
|
-
throw new Error('Could not guess the grant type');
|
|
494
|
-
};
|
|
495
|
-
return OAuthMethod;
|
|
496
|
-
}());
|
|
497
|
-
OAuthMethod.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthMethod, deps: [{ token: i1.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
498
|
-
OAuthMethod.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthMethod, providedIn: 'root' });
|
|
499
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthMethod, decorators: [{
|
|
500
|
-
type: i0.Injectable,
|
|
501
|
-
args: [{ providedIn: 'root' }]
|
|
502
|
-
}], ctorParameters: function () {
|
|
503
|
-
return [{ type: i1__namespace.HttpClient, decorators: [{
|
|
504
|
-
type: i0.Inject,
|
|
505
|
-
args: [i1.HttpClient]
|
|
506
|
-
}] }];
|
|
507
|
-
} });
|
|
508
|
-
|
|
509
|
-
function DefaultRedirectSignInFactory() {
|
|
510
|
-
return ['/', 'authentication', 'login'];
|
|
511
|
-
}
|
|
512
|
-
var RXAP_O_AUTH_REDIRECT_SIGN_IN = new i0.InjectionToken('rxap/o-auth/redirect-sign-in', {
|
|
513
|
-
providedIn: 'root',
|
|
514
|
-
factory: DefaultRedirectSignInFactory
|
|
515
|
-
});
|
|
516
|
-
var RXAP_O_AUTH_REDIRECT_SIGN_OUT = new i0.InjectionToken('rxap/o-auth/redirect-sign-out');
|
|
517
|
-
function DefaultRedirectUrl() {
|
|
518
|
-
return location.origin + '/oauth';
|
|
519
|
-
}
|
|
520
|
-
var RXAP_O_AUTH_REDIRECT_URL = new i0.InjectionToken('rxap/o-auth/redirect-url', {
|
|
521
|
-
providedIn: 'root',
|
|
522
|
-
factory: DefaultRedirectUrl
|
|
523
|
-
});
|
|
524
|
-
|
|
525
|
-
var OAUTH_SECRET = new i0.InjectionToken('OAUTH_SECRET');
|
|
526
|
-
var OAUTH_AUTH_ENDPOINT = new i0.InjectionToken('OAUTH_AUTH_ENDPOINT');
|
|
527
|
-
var OAUTH_SSO_URL = new i0.InjectionToken('OAUTH_SSO_URL');
|
|
528
|
-
var ACCESS_TOKEN_LOCAL_STORAGE_KEY = 'access_token';
|
|
529
|
-
var REFRESH_TOKEN_LOCAL_STORAGE_KEY = 'refresh_token';
|
|
530
|
-
var EXPIRES_AT_LOCAL_STORAGE_KEY = 'expires_at';
|
|
531
|
-
var REMEMBER_LOCAL_STORAGE_KEY = 'remember';
|
|
532
|
-
var OAuthService = /** @class */ (function () {
|
|
533
|
-
function OAuthService(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint, authEndpoint, secret, ssoUrl, redirectSignOut, redirectUrl) {
|
|
534
|
-
if (profileEndpoint === void 0) { profileEndpoint = null; }
|
|
535
|
-
if (authEndpoint === void 0) { authEndpoint = null; }
|
|
536
|
-
if (secret === void 0) { secret = null; }
|
|
537
|
-
if (ssoUrl === void 0) { ssoUrl = null; }
|
|
538
|
-
if (redirectSignOut === void 0) { redirectSignOut = null; }
|
|
539
|
-
if (redirectUrl === void 0) { redirectUrl = null; }
|
|
540
|
-
this.oAuthMethod = oAuthMethod;
|
|
541
|
-
this.getOAuthProfileMethod = getOAuthProfileMethod;
|
|
542
|
-
this.router = router;
|
|
543
|
-
this.profileEndpoint = profileEndpoint;
|
|
544
|
-
this.authEndpoint = authEndpoint;
|
|
545
|
-
this.secret = secret;
|
|
546
|
-
this.ssoUrl = ssoUrl;
|
|
547
|
-
this.redirectSignOut = redirectSignOut;
|
|
548
|
-
this.redirectUrl = redirectUrl;
|
|
549
|
-
this._isAuthenticated = null;
|
|
550
|
-
}
|
|
551
|
-
Object.defineProperty(OAuthService.prototype, "expiresAt", {
|
|
552
|
-
get: function () {
|
|
553
|
-
var expiresAt = this.getItem(EXPIRES_AT_LOCAL_STORAGE_KEY);
|
|
554
|
-
if (expiresAt) {
|
|
555
|
-
return new Date(parseInt(this.getItem(EXPIRES_AT_LOCAL_STORAGE_KEY), 10));
|
|
556
|
-
}
|
|
557
|
-
return null;
|
|
558
|
-
},
|
|
559
|
-
set: function (value) {
|
|
560
|
-
if (value) {
|
|
561
|
-
this.setItem(EXPIRES_AT_LOCAL_STORAGE_KEY, value.getTime().toFixed(0));
|
|
562
|
-
}
|
|
563
|
-
else {
|
|
564
|
-
this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);
|
|
565
|
-
}
|
|
566
|
-
},
|
|
567
|
-
enumerable: false,
|
|
568
|
-
configurable: true
|
|
569
|
-
});
|
|
570
|
-
Object.defineProperty(OAuthService.prototype, "refreshToken", {
|
|
571
|
-
get: function () {
|
|
572
|
-
return this.getItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);
|
|
573
|
-
},
|
|
574
|
-
set: function (value) {
|
|
575
|
-
if (value) {
|
|
576
|
-
this.setItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY, value);
|
|
577
|
-
}
|
|
578
|
-
else {
|
|
579
|
-
this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
enumerable: false,
|
|
583
|
-
configurable: true
|
|
584
|
-
});
|
|
585
|
-
Object.defineProperty(OAuthService.prototype, "accessToken", {
|
|
586
|
-
get: function () {
|
|
587
|
-
return this.getItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);
|
|
588
|
-
},
|
|
589
|
-
set: function (value) {
|
|
590
|
-
if (value) {
|
|
591
|
-
this.setItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY, value);
|
|
592
|
-
}
|
|
593
|
-
else {
|
|
594
|
-
this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
enumerable: false,
|
|
598
|
-
configurable: true
|
|
599
|
-
});
|
|
600
|
-
Object.defineProperty(OAuthService.prototype, "expiresIn", {
|
|
601
|
-
/**
|
|
602
|
-
* The time until the access token expires in seconds
|
|
603
|
-
*/
|
|
604
|
-
get: function () {
|
|
605
|
-
var expiresAt = this.expiresAt;
|
|
606
|
-
if (expiresAt) {
|
|
607
|
-
return Math.round((expiresAt.getTime() - Date.now()) / 1000);
|
|
608
|
-
}
|
|
609
|
-
return null;
|
|
610
|
-
},
|
|
611
|
-
enumerable: false,
|
|
612
|
-
configurable: true
|
|
613
|
-
});
|
|
614
|
-
Object.defineProperty(OAuthService.prototype, "remember", {
|
|
615
|
-
get: function () {
|
|
616
|
-
return !!this.getItem(REMEMBER_LOCAL_STORAGE_KEY);
|
|
617
|
-
},
|
|
618
|
-
set: function (value) {
|
|
619
|
-
if (value) {
|
|
620
|
-
this.setItem(REMEMBER_LOCAL_STORAGE_KEY, 'true');
|
|
621
|
-
}
|
|
622
|
-
else {
|
|
623
|
-
this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);
|
|
624
|
-
}
|
|
625
|
-
},
|
|
626
|
-
enumerable: false,
|
|
627
|
-
configurable: true
|
|
628
|
-
});
|
|
629
|
-
Object.defineProperty(OAuthService.prototype, "profile", {
|
|
630
|
-
get: function () {
|
|
631
|
-
return this._profile;
|
|
632
|
-
},
|
|
633
|
-
enumerable: false,
|
|
634
|
-
configurable: true
|
|
635
|
-
});
|
|
636
|
-
OAuthService.prototype.signInWithRedirect = function (lastUrl) {
|
|
637
|
-
if (!this.redirectUrl) {
|
|
638
|
-
throw new Error('Redirect url is not defined');
|
|
639
|
-
}
|
|
640
|
-
location.replace(this.ssoUrl + "?redirect=" + btoa(this.redirectUrl) + "&secret=" + this.secret + "&payload=" + btoa(JSON.stringify({ lastUrl: lastUrl })));
|
|
641
|
-
};
|
|
642
|
-
OAuthService.prototype.isAuthenticated = function () {
|
|
643
|
-
var _a;
|
|
644
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
645
|
-
var profile, e_1;
|
|
646
|
-
return __generator(this, function (_c) {
|
|
647
|
-
switch (_c.label) {
|
|
648
|
-
case 0:
|
|
649
|
-
if (!this.secret) {
|
|
650
|
-
throw new Error('The oauth secret is not defined');
|
|
651
|
-
}
|
|
652
|
-
if (!this.authEndpoint) {
|
|
653
|
-
throw new Error('The oauth auth endpoint is not defined');
|
|
654
|
-
}
|
|
655
|
-
if (this._isAuthenticated !== null) {
|
|
656
|
-
return [2 /*return*/, this._isAuthenticated];
|
|
657
|
-
}
|
|
658
|
-
if (!this.accessToken) return [3 /*break*/, 3];
|
|
659
|
-
console.debug('Access token is defined: ' + this.accessToken);
|
|
660
|
-
if (!(this.expiresIn && this.expiresIn > 60)) return [3 /*break*/, 2];
|
|
661
|
-
return [4 /*yield*/, this.getProfile()];
|
|
662
|
-
case 1:
|
|
663
|
-
profile = _c.sent();
|
|
664
|
-
if (!profile) {
|
|
665
|
-
console.log('profile is not defined');
|
|
666
|
-
return [2 /*return*/, (this._isAuthenticated = false)];
|
|
667
|
-
}
|
|
668
|
-
this.authenticated({
|
|
669
|
-
refreshToken: this.refreshToken,
|
|
670
|
-
accessToken: this.accessToken,
|
|
671
|
-
expiresAt: (_a = this.expiresAt) !== null && _a !== void 0 ? _a : new Date(Date.now() + 60 * 1000),
|
|
672
|
-
expiresIn: this.expiresIn,
|
|
673
|
-
}, this.remember);
|
|
674
|
-
return [2 /*return*/, (this._isAuthenticated = true)];
|
|
675
|
-
case 2:
|
|
676
|
-
this.accessToken = null;
|
|
677
|
-
this.expiresAt = null;
|
|
678
|
-
console.warn('The access token expires soon. Use refresh token instead.');
|
|
679
|
-
_c.label = 3;
|
|
680
|
-
case 3:
|
|
681
|
-
if (!this.refreshToken) return [3 /*break*/, 7];
|
|
682
|
-
console.debug('Refresh token is defined: ' + this.refreshToken);
|
|
683
|
-
_c.label = 4;
|
|
684
|
-
case 4:
|
|
685
|
-
_c.trys.push([4, 6, , 7]);
|
|
686
|
-
return [4 /*yield*/, this.signInWithRefreshToken(this.refreshToken)];
|
|
687
|
-
case 5:
|
|
688
|
-
_c.sent();
|
|
689
|
-
return [2 /*return*/, (this._isAuthenticated = true)];
|
|
690
|
-
case 6:
|
|
691
|
-
e_1 = _c.sent();
|
|
692
|
-
if (![401, 403, 400].includes(e_1.status)) {
|
|
693
|
-
console.error('Could not sign in with refresh token', e_1.message);
|
|
694
|
-
throw e_1;
|
|
695
|
-
}
|
|
696
|
-
console.warn('Refresh token is expired');
|
|
697
|
-
return [3 /*break*/, 7];
|
|
698
|
-
case 7:
|
|
699
|
-
console.warn('Unauthenticated');
|
|
700
|
-
return [2 /*return*/, (this._isAuthenticated = false)];
|
|
701
|
-
}
|
|
702
|
-
});
|
|
703
|
-
});
|
|
704
|
-
};
|
|
705
|
-
OAuthService.prototype.signInWithEmailAndPassword = function (email, password, remember) {
|
|
706
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
707
|
-
var response;
|
|
708
|
-
return __generator(this, function (_c) {
|
|
709
|
-
switch (_c.label) {
|
|
710
|
-
case 0:
|
|
711
|
-
if (!this.secret) {
|
|
712
|
-
throw new Error('The oauth secret is not defined');
|
|
713
|
-
}
|
|
714
|
-
if (!this.authEndpoint) {
|
|
715
|
-
throw new Error('The oauth auth endpoint is not defined');
|
|
716
|
-
}
|
|
717
|
-
return [4 /*yield*/, this.oAuthMethod.call({
|
|
718
|
-
username: email,
|
|
719
|
-
password: password,
|
|
720
|
-
authEndpoint: this.authEndpoint,
|
|
721
|
-
secret: this.secret,
|
|
722
|
-
})];
|
|
723
|
-
case 1:
|
|
724
|
-
response = _c.sent();
|
|
725
|
-
this.authenticated(response, remember);
|
|
726
|
-
return [2 /*return*/, response];
|
|
727
|
-
}
|
|
728
|
-
});
|
|
729
|
-
});
|
|
730
|
-
};
|
|
731
|
-
OAuthService.prototype.getProfile = function () {
|
|
732
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
733
|
-
var profile, e_2;
|
|
734
|
-
return __generator(this, function (_c) {
|
|
735
|
-
switch (_c.label) {
|
|
736
|
-
case 0:
|
|
737
|
-
profile = null;
|
|
738
|
-
if (!this.accessToken) {
|
|
739
|
-
throw new Error('The access token is not defined');
|
|
740
|
-
}
|
|
741
|
-
if (!this.profileEndpoint) return [3 /*break*/, 5];
|
|
742
|
-
_c.label = 1;
|
|
743
|
-
case 1:
|
|
744
|
-
_c.trys.push([1, 3, , 4]);
|
|
745
|
-
return [4 /*yield*/, this.getOAuthProfileMethod.call({
|
|
746
|
-
accessToken: this.accessToken,
|
|
747
|
-
profileEndpoint: this.profileEndpoint,
|
|
748
|
-
})];
|
|
749
|
-
case 2:
|
|
750
|
-
profile = _c.sent();
|
|
751
|
-
return [3 /*break*/, 4];
|
|
752
|
-
case 3:
|
|
753
|
-
e_2 = _c.sent();
|
|
754
|
-
console.error('Could not request the user profile', e_2.message);
|
|
755
|
-
return [3 /*break*/, 4];
|
|
756
|
-
case 4: return [3 /*break*/, 6];
|
|
757
|
-
case 5:
|
|
758
|
-
console.warn('The profile endpoint is not defined!');
|
|
759
|
-
_c.label = 6;
|
|
760
|
-
case 6: return [2 /*return*/, (this._profile = profile)];
|
|
761
|
-
}
|
|
762
|
-
});
|
|
763
|
-
});
|
|
764
|
-
};
|
|
765
|
-
OAuthService.prototype.signOut = function () {
|
|
766
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
767
|
-
return __generator(this, function (_c) {
|
|
768
|
-
switch (_c.label) {
|
|
769
|
-
case 0:
|
|
770
|
-
this.clearStorage();
|
|
771
|
-
this.accessToken = null;
|
|
772
|
-
this.refreshToken = null;
|
|
773
|
-
this.expiresAt = null;
|
|
774
|
-
this._isAuthenticated = false;
|
|
775
|
-
if (!this.redirectSignOut) return [3 /*break*/, 2];
|
|
776
|
-
return [4 /*yield*/, this.router.navigate(this.redirectSignOut)];
|
|
777
|
-
case 1:
|
|
778
|
-
_c.sent();
|
|
779
|
-
return [3 /*break*/, 3];
|
|
780
|
-
case 2:
|
|
781
|
-
if (!this.redirectUrl) {
|
|
782
|
-
throw new Error('Redirect url is not defined');
|
|
783
|
-
}
|
|
784
|
-
location.replace(this.ssoUrl + "?redirect=" + btoa(this.redirectUrl) + "&secret=" + this.secret + "&action=signOut");
|
|
785
|
-
_c.label = 3;
|
|
786
|
-
case 3: return [2 /*return*/];
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
});
|
|
790
|
-
};
|
|
791
|
-
OAuthService.prototype.authenticated = function (response, remember) {
|
|
792
|
-
var _a, _b;
|
|
793
|
-
if (remember === void 0) {
|
|
794
|
-
remember = (_a = this.remember) !== null && _a !== void 0 ? _a : false;
|
|
795
|
-
}
|
|
796
|
-
this.accessToken = response.accessToken;
|
|
797
|
-
this.refreshToken = (_b = response.refreshToken) !== null && _b !== void 0 ? _b : null;
|
|
798
|
-
this.expiresAt = response.expiresAt;
|
|
799
|
-
console.log("Authenticated until " + this.expiresAt.toISOString());
|
|
800
|
-
this.remember = remember;
|
|
801
|
-
if (remember) {
|
|
802
|
-
this.setItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY, response.accessToken);
|
|
803
|
-
if (response.refreshToken) {
|
|
804
|
-
this.setItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY, response.refreshToken);
|
|
805
|
-
}
|
|
806
|
-
this.setItem(REMEMBER_LOCAL_STORAGE_KEY, 'true');
|
|
807
|
-
if (response.expiresAt) {
|
|
808
|
-
console.log("Authenticated until " + response.expiresAt.toISOString());
|
|
809
|
-
this.setItem(EXPIRES_AT_LOCAL_STORAGE_KEY, response.expiresAt.getTime().toFixed(0));
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
else {
|
|
813
|
-
this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);
|
|
814
|
-
this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);
|
|
815
|
-
this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);
|
|
816
|
-
this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);
|
|
817
|
-
}
|
|
818
|
-
this._isAuthenticated = true;
|
|
819
|
-
};
|
|
820
|
-
OAuthService.prototype.getKey = function (key) {
|
|
821
|
-
return [this.secret, key].join('__');
|
|
822
|
-
};
|
|
823
|
-
OAuthService.prototype.getItem = function (key) {
|
|
824
|
-
return localStorage.getItem(this.getKey(key));
|
|
825
|
-
};
|
|
826
|
-
OAuthService.prototype.setItem = function (key, value) {
|
|
827
|
-
localStorage.setItem(this.getKey(key), value);
|
|
828
|
-
};
|
|
829
|
-
OAuthService.prototype.removeItem = function (key) {
|
|
830
|
-
localStorage.removeItem(this.getKey(key));
|
|
831
|
-
};
|
|
832
|
-
OAuthService.prototype.clearStorage = function () {
|
|
833
|
-
this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);
|
|
834
|
-
this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);
|
|
835
|
-
this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);
|
|
836
|
-
this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);
|
|
837
|
-
};
|
|
838
|
-
OAuthService.prototype.signInWithRefreshToken = function (refreshToken) {
|
|
839
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
840
|
-
var response;
|
|
841
|
-
return __generator(this, function (_c) {
|
|
842
|
-
switch (_c.label) {
|
|
843
|
-
case 0:
|
|
844
|
-
if (!this.secret) {
|
|
845
|
-
throw new Error('The oauth secret is not defined');
|
|
846
|
-
}
|
|
847
|
-
if (!this.authEndpoint) {
|
|
848
|
-
throw new Error('The oauth auth endpoint is not defined');
|
|
849
|
-
}
|
|
850
|
-
return [4 /*yield*/, this.oAuthMethod.call({
|
|
851
|
-
refreshToken: refreshToken,
|
|
852
|
-
authEndpoint: this.authEndpoint,
|
|
853
|
-
secret: this.secret,
|
|
854
|
-
})];
|
|
855
|
-
case 1:
|
|
856
|
-
response = _c.sent();
|
|
857
|
-
this.authenticated(response);
|
|
858
|
-
return [2 /*return*/, response];
|
|
859
|
-
}
|
|
860
|
-
});
|
|
861
|
-
});
|
|
862
|
-
};
|
|
863
|
-
return OAuthService;
|
|
864
|
-
}());
|
|
865
|
-
OAuthService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthService, deps: [{ token: OAuthMethod }, { token: GetOAuthProfileMethod }, { token: i1$1.Router }, { token: PROFILE_AUTH_ENDPOINT, optional: true }, { token: OAUTH_AUTH_ENDPOINT, optional: true }, { token: OAUTH_SECRET, optional: true }, { token: OAUTH_SSO_URL, optional: true }, { token: RXAP_O_AUTH_REDIRECT_SIGN_OUT, optional: true }, { token: RXAP_O_AUTH_REDIRECT_URL, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
866
|
-
OAuthService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthService, providedIn: 'root' });
|
|
867
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthService, decorators: [{
|
|
868
|
-
type: i0.Injectable,
|
|
869
|
-
args: [{ providedIn: 'root' }]
|
|
870
|
-
}], ctorParameters: function () {
|
|
871
|
-
return [{ type: OAuthMethod, decorators: [{
|
|
872
|
-
type: i0.Inject,
|
|
873
|
-
args: [OAuthMethod]
|
|
874
|
-
}] }, { type: GetOAuthProfileMethod, decorators: [{
|
|
875
|
-
type: i0.Inject,
|
|
876
|
-
args: [GetOAuthProfileMethod]
|
|
877
|
-
}] }, { type: i1__namespace$1.Router, decorators: [{
|
|
878
|
-
type: i0.Inject,
|
|
879
|
-
args: [i1$1.Router]
|
|
880
|
-
}] }, { type: undefined, decorators: [{
|
|
881
|
-
type: i0.Optional
|
|
882
|
-
}, {
|
|
883
|
-
type: i0.Inject,
|
|
884
|
-
args: [PROFILE_AUTH_ENDPOINT]
|
|
885
|
-
}] }, { type: undefined, decorators: [{
|
|
886
|
-
type: i0.Optional
|
|
887
|
-
}, {
|
|
888
|
-
type: i0.Inject,
|
|
889
|
-
args: [OAUTH_AUTH_ENDPOINT]
|
|
890
|
-
}] }, { type: undefined, decorators: [{
|
|
891
|
-
type: i0.Optional
|
|
892
|
-
}, {
|
|
893
|
-
type: i0.Inject,
|
|
894
|
-
args: [OAUTH_SECRET]
|
|
895
|
-
}] }, { type: undefined, decorators: [{
|
|
896
|
-
type: i0.Optional
|
|
897
|
-
}, {
|
|
898
|
-
type: i0.Inject,
|
|
899
|
-
args: [OAUTH_SSO_URL]
|
|
900
|
-
}] }, { type: undefined, decorators: [{
|
|
901
|
-
type: i0.Optional
|
|
902
|
-
}, {
|
|
903
|
-
type: i0.Inject,
|
|
904
|
-
args: [RXAP_O_AUTH_REDIRECT_SIGN_OUT]
|
|
905
|
-
}] }, { type: undefined, decorators: [{
|
|
906
|
-
type: i0.Optional
|
|
907
|
-
}, {
|
|
908
|
-
type: i0.Inject,
|
|
909
|
-
args: [RXAP_O_AUTH_REDIRECT_URL]
|
|
910
|
-
}] }];
|
|
911
|
-
} });
|
|
912
|
-
|
|
913
|
-
var OAuthExtractGuard = /** @class */ (function () {
|
|
914
|
-
function OAuthExtractGuard(router, oAuthService) {
|
|
915
|
-
this.router = router;
|
|
916
|
-
this.oAuthService = oAuthService;
|
|
917
|
-
}
|
|
918
|
-
OAuthExtractGuard.prototype.canActivate = function (route) {
|
|
919
|
-
if (route.queryParamMap.has('accessToken') && route.queryParamMap.has('refreshToken') && route.queryParamMap.has('expiresIn')) {
|
|
920
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
921
|
-
var accessToken = route.queryParamMap.get('accessToken');
|
|
922
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
923
|
-
var refreshToken = route.queryParamMap.get('refreshToken');
|
|
924
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
925
|
-
var expiresIn = parseInt(route.queryParamMap.get('expiresIn'), 10);
|
|
926
|
-
var payloadBase64 = route.queryParamMap.get('payload');
|
|
927
|
-
var expiresAt = new Date(Date.now() + expiresIn * 1000);
|
|
928
|
-
this.oAuthService.authenticated({
|
|
929
|
-
accessToken: accessToken,
|
|
930
|
-
refreshToken: refreshToken,
|
|
931
|
-
expiresIn: expiresIn,
|
|
932
|
-
expiresAt: expiresAt
|
|
933
|
-
}, true);
|
|
934
|
-
var redirectUrl = '/';
|
|
935
|
-
if (payloadBase64) {
|
|
936
|
-
try {
|
|
937
|
-
var payload = JSON.parse(atob(payloadBase64));
|
|
938
|
-
console.debug('sso redirect payload', payload);
|
|
939
|
-
if (payload.lastUrl) {
|
|
940
|
-
redirectUrl = payload.lastUrl;
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
catch (e) {
|
|
944
|
-
console.error('Could not parse redirect payload', e.message);
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
return this.router.createUrlTree([redirectUrl]);
|
|
948
|
-
}
|
|
949
|
-
else {
|
|
950
|
-
console.warn('Not every query parameter is defined!');
|
|
951
|
-
}
|
|
952
|
-
return this.router.createUrlTree(__spreadArray(__spreadArray([], __read(route.url.map(function (url) { return url.path; }))), ['redirect']));
|
|
953
|
-
};
|
|
954
|
-
return OAuthExtractGuard;
|
|
955
|
-
}());
|
|
956
|
-
OAuthExtractGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthExtractGuard, deps: [{ token: i1__namespace$1.Router }, { token: OAuthService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
957
|
-
OAuthExtractGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthExtractGuard, providedIn: 'root' });
|
|
958
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthExtractGuard, decorators: [{
|
|
959
|
-
type: i0.Injectable,
|
|
960
|
-
args: [{ providedIn: 'root' }]
|
|
961
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: OAuthService }]; } });
|
|
962
|
-
|
|
963
|
-
var OAuthRedirectGuard = /** @class */ (function () {
|
|
964
|
-
function OAuthRedirectGuard(oAuthService) {
|
|
965
|
-
this.oAuthService = oAuthService;
|
|
966
|
-
}
|
|
967
|
-
OAuthRedirectGuard.prototype.canActivate = function (route, state) {
|
|
968
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
969
|
-
var isAuthenticated;
|
|
970
|
-
return __generator(this, function (_a) {
|
|
971
|
-
switch (_a.label) {
|
|
972
|
-
case 0: return [4 /*yield*/, this.oAuthService.isAuthenticated()];
|
|
973
|
-
case 1:
|
|
974
|
-
isAuthenticated = _a.sent();
|
|
975
|
-
console.log("isAuthenticated: " + isAuthenticated);
|
|
976
|
-
if (isAuthenticated) {
|
|
977
|
-
return [2 /*return*/, true];
|
|
978
|
-
}
|
|
979
|
-
this.oAuthService.signInWithRedirect(state.url);
|
|
980
|
-
return [2 /*return*/, false];
|
|
981
|
-
}
|
|
982
|
-
});
|
|
983
|
-
});
|
|
984
|
-
};
|
|
985
|
-
OAuthRedirectGuard.prototype.canActivateChild = function (childRoute, state) {
|
|
986
|
-
return this.canActivate(childRoute, state);
|
|
987
|
-
};
|
|
988
|
-
return OAuthRedirectGuard;
|
|
989
|
-
}());
|
|
990
|
-
OAuthRedirectGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthRedirectGuard, deps: [{ token: OAuthService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
991
|
-
OAuthRedirectGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthRedirectGuard, providedIn: 'root' });
|
|
992
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthRedirectGuard, decorators: [{
|
|
993
|
-
type: i0.Injectable,
|
|
994
|
-
args: [{ providedIn: 'root' }]
|
|
995
|
-
}], ctorParameters: function () {
|
|
996
|
-
return [{ type: OAuthService, decorators: [{
|
|
997
|
-
type: i0.Inject,
|
|
998
|
-
args: [OAuthService]
|
|
999
|
-
}] }];
|
|
1000
|
-
} });
|
|
1001
|
-
|
|
1002
|
-
var OAuthModule = /** @class */ (function () {
|
|
1003
|
-
function OAuthModule() {
|
|
1004
|
-
}
|
|
1005
|
-
OAuthModule.forRoot = function (options) {
|
|
1006
|
-
if (options === void 0) { options = {}; }
|
|
1007
|
-
var _a, _b;
|
|
1008
|
-
return {
|
|
1009
|
-
ngModule: OAuthModule,
|
|
1010
|
-
providers: [
|
|
1011
|
-
{
|
|
1012
|
-
provide: RXAP_O_AUTH_REDIRECT_SIGN_IN,
|
|
1013
|
-
useValue: (_a = options.signInPath) !== null && _a !== void 0 ? _a : ['/', 'oauth', 'redirect']
|
|
1014
|
-
},
|
|
1015
|
-
{
|
|
1016
|
-
provide: RXAP_O_AUTH_REDIRECT_SIGN_OUT,
|
|
1017
|
-
useValue: (_b = options.signOutPath) !== null && _b !== void 0 ? _b : null
|
|
1018
|
-
}
|
|
1019
|
-
]
|
|
1020
|
-
};
|
|
1021
|
-
};
|
|
1022
|
-
return OAuthModule;
|
|
1023
|
-
}());
|
|
1024
|
-
OAuthModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1025
|
-
OAuthModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthModule });
|
|
1026
|
-
OAuthModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthModule });
|
|
1027
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthModule, decorators: [{
|
|
1028
|
-
type: i0.NgModule
|
|
1029
|
-
}] });
|
|
1030
|
-
|
|
1031
|
-
var ContainerComponent = /** @class */ (function () {
|
|
1032
|
-
function ContainerComponent() {
|
|
1033
|
-
}
|
|
1034
|
-
ContainerComponent.prototype.prepareRoute = function (outlet) {
|
|
1035
|
-
return outlet.isActivated ? outlet.activatedRoute : 'true';
|
|
1036
|
-
};
|
|
1037
|
-
return ContainerComponent;
|
|
1038
|
-
}());
|
|
1039
|
-
ContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ContainerComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1040
|
-
ContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ContainerComponent, selector: "rxap-container", host: { classAttribute: "rxap-container" }, ngImport: i0__namespace, template: "<div [@routeAnimations]=\"prepareRoute(outlet)\" class=\"container\">\n\n <div class=\"split mat-elevation-z3\"></div>\n\n <router-outlet #outlet=\"outlet\"></router-outlet>\n\n</div>\n", styles: [".container{height:100vh;width:100vw;display:flex;align-items:center;justify-content:center}.container .split{position:absolute;top:0;left:0;right:0;bottom:65vh;z-index:-10}"], directives: [{ type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], animations: [
|
|
1041
|
-
animations.trigger('routeAnimations', [
|
|
1042
|
-
animations.transition(':enter', [
|
|
1043
|
-
animations.style({ opacity: 0 }),
|
|
1044
|
-
animations.animate('512ms', animations.style({ opacity: 1 }))
|
|
1045
|
-
]),
|
|
1046
|
-
animations.transition(':leave', [
|
|
1047
|
-
animations.style({ opacity: 1 }),
|
|
1048
|
-
animations.animate('512ms', animations.style({ opacity: 0 }))
|
|
1049
|
-
])
|
|
1050
|
-
])
|
|
1051
|
-
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1052
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ContainerComponent, decorators: [{
|
|
1053
|
-
type: i0.Component,
|
|
1054
|
-
args: [{
|
|
1055
|
-
selector: 'rxap-container',
|
|
1056
|
-
templateUrl: './container.component.html',
|
|
1057
|
-
styleUrls: ['./container.component.scss'],
|
|
1058
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1059
|
-
host: { class: 'rxap-container' },
|
|
1060
|
-
animations: [
|
|
1061
|
-
animations.trigger('routeAnimations', [
|
|
1062
|
-
animations.transition(':enter', [
|
|
1063
|
-
animations.style({ opacity: 0 }),
|
|
1064
|
-
animations.animate('512ms', animations.style({ opacity: 1 }))
|
|
1065
|
-
]),
|
|
1066
|
-
animations.transition(':leave', [
|
|
1067
|
-
animations.style({ opacity: 1 }),
|
|
1068
|
-
animations.animate('512ms', animations.style({ opacity: 0 }))
|
|
1069
|
-
])
|
|
1070
|
-
])
|
|
1071
|
-
]
|
|
1072
|
-
}]
|
|
1073
|
-
}] });
|
|
1074
|
-
|
|
1075
|
-
var LoadingComponent = /** @class */ (function () {
|
|
1076
|
-
function LoadingComponent() {
|
|
1077
|
-
}
|
|
1078
|
-
return LoadingComponent;
|
|
1079
|
-
}());
|
|
1080
|
-
LoadingComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: LoadingComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1081
|
-
LoadingComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: LoadingComponent, selector: "rxap-loading", host: { classAttribute: "rxap-loading" }, ngImport: i0__namespace, template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n", styles: [""], components: [{ type: i1__namespace$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "mode", "value", "bufferValue"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1082
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: LoadingComponent, decorators: [{
|
|
1083
|
-
type: i0.Component,
|
|
1084
|
-
args: [{
|
|
1085
|
-
selector: 'rxap-loading',
|
|
1086
|
-
templateUrl: './loading.component.html',
|
|
1087
|
-
styleUrls: ['./loading.component.scss'],
|
|
1088
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1089
|
-
host: { class: 'rxap-loading' }
|
|
1090
|
-
}]
|
|
1091
|
-
}] });
|
|
1092
|
-
|
|
1093
|
-
var SignInWithRedirectComponent = /** @class */ (function () {
|
|
1094
|
-
function SignInWithRedirectComponent(authService) {
|
|
1095
|
-
this.authService = authService;
|
|
1096
|
-
}
|
|
1097
|
-
SignInWithRedirectComponent.prototype.signIn = function () {
|
|
1098
|
-
this.authService.signInWithRedirect();
|
|
1099
|
-
};
|
|
1100
|
-
return SignInWithRedirectComponent;
|
|
1101
|
-
}());
|
|
1102
|
-
SignInWithRedirectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SignInWithRedirectComponent, deps: [{ token: OAuthService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1103
|
-
SignInWithRedirectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: SignInWithRedirectComponent, selector: "rxap-sign-in-with-redirect", host: { classAttribute: "rxap-sign-in-with-redirect" }, ngImport: i0__namespace, template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"32px\">\n\n <div class=\"header\" fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n\n <mat-icon class=\"avatar-icon\" color=\"primary\" fxFlex=\"nogrow\">account_circle</mat-icon>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signIn()\" color=\"primary\" fxFlex=\"nogrow\" mat-raised-button>\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"16px\">\n <mat-icon fxFlex=\"nogrow\">login</mat-icon>\n <span fxFlex=\"nogrow\">Sign In</span>\n </span>\n </button>\n </div>\n\n </div>\n\n</div>\n\n", styles: [".inner{padding:64px;position:relative}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px}"], components: [{ type: i2__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i4__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], animations: [
|
|
1104
|
-
animations.trigger('fadeAnimation', [
|
|
1105
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
1106
|
-
animations.state('in', animations.style({ opacity: 1 })),
|
|
1107
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
1108
|
-
animations.transition(':enter', [
|
|
1109
|
-
animations.style({ opacity: 0 }),
|
|
1110
|
-
animations.animate(300)
|
|
1111
|
-
]),
|
|
1112
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
1113
|
-
animations.transition(':leave', animations.animate(300, animations.style({ opacity: 0 })))
|
|
1114
|
-
])
|
|
1115
|
-
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1116
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SignInWithRedirectComponent, decorators: [{
|
|
1117
|
-
type: i0.Component,
|
|
1118
|
-
args: [{
|
|
1119
|
-
selector: 'rxap-sign-in-with-redirect',
|
|
1120
|
-
templateUrl: './sign-in-with-redirect.component.html',
|
|
1121
|
-
styleUrls: ['./sign-in-with-redirect.component.scss'],
|
|
1122
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1123
|
-
host: { class: 'rxap-sign-in-with-redirect' },
|
|
1124
|
-
animations: [
|
|
1125
|
-
animations.trigger('fadeAnimation', [
|
|
1126
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
1127
|
-
animations.state('in', animations.style({ opacity: 1 })),
|
|
1128
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
1129
|
-
animations.transition(':enter', [
|
|
1130
|
-
animations.style({ opacity: 0 }),
|
|
1131
|
-
animations.animate(300)
|
|
1132
|
-
]),
|
|
1133
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
1134
|
-
animations.transition(':leave', animations.animate(300, animations.style({ opacity: 0 })))
|
|
1135
|
-
])
|
|
1136
|
-
]
|
|
1137
|
-
}]
|
|
1138
|
-
}], ctorParameters: function () { return [{ type: OAuthService }]; } });
|
|
1139
|
-
|
|
1140
|
-
var RXAP_O_AUTH_ROUTES = [
|
|
1141
|
-
{
|
|
1142
|
-
path: 'oauth',
|
|
1143
|
-
component: ContainerComponent,
|
|
1144
|
-
children: [
|
|
1145
|
-
{
|
|
1146
|
-
path: 'redirect',
|
|
1147
|
-
component: SignInWithRedirectComponent
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
canActivate: [OAuthExtractGuard],
|
|
1151
|
-
path: '',
|
|
1152
|
-
component: LoadingComponent
|
|
1153
|
-
},
|
|
1154
|
-
{
|
|
1155
|
-
path: '**',
|
|
1156
|
-
redirectTo: ''
|
|
1157
|
-
}
|
|
1158
|
-
]
|
|
1159
|
-
}
|
|
1160
|
-
];
|
|
1161
|
-
|
|
1162
|
-
var ProfileResolve = /** @class */ (function () {
|
|
1163
|
-
function ProfileResolve(oAuthService, router, redirectLogin) {
|
|
1164
|
-
this.oAuthService = oAuthService;
|
|
1165
|
-
this.router = router;
|
|
1166
|
-
this.redirectLogin = redirectLogin;
|
|
1167
|
-
}
|
|
1168
|
-
ProfileResolve.prototype.resolve = function () {
|
|
1169
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1170
|
-
var profile;
|
|
1171
|
-
return __generator(this, function (_a) {
|
|
1172
|
-
switch (_a.label) {
|
|
1173
|
-
case 0: return [4 /*yield*/, this.oAuthService.getProfile()];
|
|
1174
|
-
case 1:
|
|
1175
|
-
profile = _a.sent();
|
|
1176
|
-
if (!!profile) return [3 /*break*/, 3];
|
|
1177
|
-
return [4 /*yield*/, this.router.navigate(this.redirectLogin)];
|
|
1178
|
-
case 2:
|
|
1179
|
-
_a.sent();
|
|
1180
|
-
_a.label = 3;
|
|
1181
|
-
case 3: return [2 /*return*/, profile];
|
|
1182
|
-
}
|
|
1183
|
-
});
|
|
1184
|
-
});
|
|
1185
|
-
};
|
|
1186
|
-
return ProfileResolve;
|
|
1187
|
-
}());
|
|
1188
|
-
ProfileResolve.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ProfileResolve, deps: [{ token: OAuthService }, { token: i1$1.Router }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1189
|
-
ProfileResolve.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ProfileResolve, providedIn: 'root' });
|
|
1190
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ProfileResolve, decorators: [{
|
|
1191
|
-
type: i0.Injectable,
|
|
1192
|
-
args: [{ providedIn: 'root' }]
|
|
1193
|
-
}], ctorParameters: function () {
|
|
1194
|
-
return [{ type: OAuthService, decorators: [{
|
|
1195
|
-
type: i0.Inject,
|
|
1196
|
-
args: [OAuthService]
|
|
1197
|
-
}] }, { type: i1__namespace$1.Router, decorators: [{
|
|
1198
|
-
type: i0.Inject,
|
|
1199
|
-
args: [i1$1.Router]
|
|
1200
|
-
}] }, { type: undefined, decorators: [{
|
|
1201
|
-
type: i0.Inject,
|
|
1202
|
-
args: [RXAP_O_AUTH_REDIRECT_SIGN_IN]
|
|
1203
|
-
}] }];
|
|
1204
|
-
} });
|
|
1205
|
-
|
|
1206
|
-
var ContainerComponentModule = /** @class */ (function () {
|
|
1207
|
-
function ContainerComponentModule() {
|
|
1208
|
-
}
|
|
1209
|
-
return ContainerComponentModule;
|
|
1210
|
-
}());
|
|
1211
|
-
ContainerComponentModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ContainerComponentModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1212
|
-
ContainerComponentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ContainerComponentModule, declarations: [ContainerComponent], imports: [i1$1.RouterModule], exports: [ContainerComponent] });
|
|
1213
|
-
ContainerComponentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ContainerComponentModule, imports: [[
|
|
1214
|
-
i1$1.RouterModule
|
|
1215
|
-
]] });
|
|
1216
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ContainerComponentModule, decorators: [{
|
|
1217
|
-
type: i0.NgModule,
|
|
1218
|
-
args: [{
|
|
1219
|
-
declarations: [ContainerComponent],
|
|
1220
|
-
imports: [
|
|
1221
|
-
i1$1.RouterModule
|
|
1222
|
-
],
|
|
1223
|
-
exports: [ContainerComponent]
|
|
1224
|
-
}]
|
|
1225
|
-
}] });
|
|
1226
|
-
|
|
1227
|
-
var LoadingComponentModule = /** @class */ (function () {
|
|
1228
|
-
function LoadingComponentModule() {
|
|
1229
|
-
}
|
|
1230
|
-
return LoadingComponentModule;
|
|
1231
|
-
}());
|
|
1232
|
-
LoadingComponentModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: LoadingComponentModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1233
|
-
LoadingComponentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: LoadingComponentModule, declarations: [LoadingComponent], imports: [i1$2.MatProgressBarModule], exports: [LoadingComponent] });
|
|
1234
|
-
LoadingComponentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: LoadingComponentModule, imports: [[
|
|
1235
|
-
i1$2.MatProgressBarModule
|
|
1236
|
-
]] });
|
|
1237
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: LoadingComponentModule, decorators: [{
|
|
1238
|
-
type: i0.NgModule,
|
|
1239
|
-
args: [{
|
|
1240
|
-
declarations: [
|
|
1241
|
-
LoadingComponent
|
|
1242
|
-
],
|
|
1243
|
-
imports: [
|
|
1244
|
-
i1$2.MatProgressBarModule
|
|
1245
|
-
],
|
|
1246
|
-
exports: [
|
|
1247
|
-
LoadingComponent
|
|
1248
|
-
]
|
|
1249
|
-
}]
|
|
1250
|
-
}] });
|
|
1251
|
-
|
|
1252
|
-
var SignInWithRedirectComponentModule = /** @class */ (function () {
|
|
1253
|
-
function SignInWithRedirectComponentModule() {
|
|
1254
|
-
}
|
|
1255
|
-
return SignInWithRedirectComponentModule;
|
|
1256
|
-
}());
|
|
1257
|
-
SignInWithRedirectComponentModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SignInWithRedirectComponentModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1258
|
-
SignInWithRedirectComponentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SignInWithRedirectComponentModule, declarations: [SignInWithRedirectComponent], imports: [card.MatCardModule,
|
|
1259
|
-
i3.MatButtonModule,
|
|
1260
|
-
flexLayout.FlexLayoutModule,
|
|
1261
|
-
i2.MatIconModule,
|
|
1262
|
-
common.CommonModule], exports: [SignInWithRedirectComponent] });
|
|
1263
|
-
SignInWithRedirectComponentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SignInWithRedirectComponentModule, imports: [[
|
|
1264
|
-
card.MatCardModule,
|
|
1265
|
-
i3.MatButtonModule,
|
|
1266
|
-
flexLayout.FlexLayoutModule,
|
|
1267
|
-
i2.MatIconModule,
|
|
1268
|
-
common.CommonModule
|
|
1269
|
-
]] });
|
|
1270
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SignInWithRedirectComponentModule, decorators: [{
|
|
1271
|
-
type: i0.NgModule,
|
|
1272
|
-
args: [{
|
|
1273
|
-
declarations: [SignInWithRedirectComponent],
|
|
1274
|
-
imports: [
|
|
1275
|
-
card.MatCardModule,
|
|
1276
|
-
i3.MatButtonModule,
|
|
1277
|
-
flexLayout.FlexLayoutModule,
|
|
1278
|
-
i2.MatIconModule,
|
|
1279
|
-
common.CommonModule
|
|
1280
|
-
],
|
|
1281
|
-
exports: [SignInWithRedirectComponent]
|
|
1282
|
-
}]
|
|
1283
|
-
}] });
|
|
1284
|
-
|
|
1285
|
-
var OAuthRoutingModule = /** @class */ (function () {
|
|
1286
|
-
function OAuthRoutingModule() {
|
|
1287
|
-
}
|
|
1288
|
-
return OAuthRoutingModule;
|
|
1289
|
-
}());
|
|
1290
|
-
OAuthRoutingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthRoutingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1291
|
-
OAuthRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthRoutingModule, exports: [ContainerComponentModule,
|
|
1292
|
-
LoadingComponentModule,
|
|
1293
|
-
SignInWithRedirectComponentModule] });
|
|
1294
|
-
OAuthRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthRoutingModule, imports: [ContainerComponentModule,
|
|
1295
|
-
LoadingComponentModule,
|
|
1296
|
-
SignInWithRedirectComponentModule] });
|
|
1297
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OAuthRoutingModule, decorators: [{
|
|
1298
|
-
type: i0.NgModule,
|
|
1299
|
-
args: [{
|
|
1300
|
-
exports: [
|
|
1301
|
-
ContainerComponentModule,
|
|
1302
|
-
LoadingComponentModule,
|
|
1303
|
-
SignInWithRedirectComponentModule
|
|
1304
|
-
]
|
|
1305
|
-
}]
|
|
1306
|
-
}] });
|
|
1307
|
-
|
|
1308
|
-
/**
|
|
1309
|
-
* Generated bundle index. Do not edit.
|
|
1310
|
-
*/
|
|
1311
|
-
|
|
1312
|
-
exports.ACCESS_TOKEN_LOCAL_STORAGE_KEY = ACCESS_TOKEN_LOCAL_STORAGE_KEY;
|
|
1313
|
-
exports.AssertOAuthMethodParameters = AssertOAuthMethodParameters;
|
|
1314
|
-
exports.AssertOAuthMethodWithRefreshTokenParameters = AssertOAuthMethodWithRefreshTokenParameters;
|
|
1315
|
-
exports.AssertOAuthMethodWithUsernamePasswordParameters = AssertOAuthMethodWithUsernamePasswordParameters;
|
|
1316
|
-
exports.ContainerComponent = ContainerComponent;
|
|
1317
|
-
exports.ContainerComponentModule = ContainerComponentModule;
|
|
1318
|
-
exports.DefaultRedirectSignInFactory = DefaultRedirectSignInFactory;
|
|
1319
|
-
exports.DefaultRedirectUrl = DefaultRedirectUrl;
|
|
1320
|
-
exports.EXPIRES_AT_LOCAL_STORAGE_KEY = EXPIRES_AT_LOCAL_STORAGE_KEY;
|
|
1321
|
-
exports.GetOAuthProfileMethod = GetOAuthProfileMethod;
|
|
1322
|
-
exports.IsOAuthMethodWithRefreshTokenParameters = IsOAuthMethodWithRefreshTokenParameters;
|
|
1323
|
-
exports.IsOAuthMethodWithUsernamePasswordParameters = IsOAuthMethodWithUsernamePasswordParameters;
|
|
1324
|
-
exports.LoadingComponent = LoadingComponent;
|
|
1325
|
-
exports.LoadingComponentModule = LoadingComponentModule;
|
|
1326
|
-
exports.OAUTH_AUTH_ENDPOINT = OAUTH_AUTH_ENDPOINT;
|
|
1327
|
-
exports.OAUTH_SECRET = OAUTH_SECRET;
|
|
1328
|
-
exports.OAUTH_SSO_URL = OAUTH_SSO_URL;
|
|
1329
|
-
exports.OAuthExtractGuard = OAuthExtractGuard;
|
|
1330
|
-
exports.OAuthMethod = OAuthMethod;
|
|
1331
|
-
exports.OAuthModule = OAuthModule;
|
|
1332
|
-
exports.OAuthRedirectGuard = OAuthRedirectGuard;
|
|
1333
|
-
exports.OAuthRoutingModule = OAuthRoutingModule;
|
|
1334
|
-
exports.OAuthService = OAuthService;
|
|
1335
|
-
exports.PROFILE_AUTH_ENDPOINT = PROFILE_AUTH_ENDPOINT;
|
|
1336
|
-
exports.ProfileResolve = ProfileResolve;
|
|
1337
|
-
exports.REFRESH_TOKEN_LOCAL_STORAGE_KEY = REFRESH_TOKEN_LOCAL_STORAGE_KEY;
|
|
1338
|
-
exports.REMEMBER_LOCAL_STORAGE_KEY = REMEMBER_LOCAL_STORAGE_KEY;
|
|
1339
|
-
exports.RXAP_O_AUTH_REDIRECT_SIGN_IN = RXAP_O_AUTH_REDIRECT_SIGN_IN;
|
|
1340
|
-
exports.RXAP_O_AUTH_REDIRECT_SIGN_OUT = RXAP_O_AUTH_REDIRECT_SIGN_OUT;
|
|
1341
|
-
exports.RXAP_O_AUTH_REDIRECT_URL = RXAP_O_AUTH_REDIRECT_URL;
|
|
1342
|
-
exports.RXAP_O_AUTH_ROUTES = RXAP_O_AUTH_ROUTES;
|
|
1343
|
-
exports.SignInWithRedirectComponent = SignInWithRedirectComponent;
|
|
1344
|
-
exports.SignInWithRedirectComponentModule = SignInWithRedirectComponentModule;
|
|
1345
|
-
|
|
1346
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1347
|
-
|
|
1348
|
-
})));
|
|
1349
|
-
//# sourceMappingURL=rxap-oauth.umd.js.map
|