@rxap/oauth 16.0.0-dev.2 → 16.0.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +371 -0
- package/README.md +7 -22
- package/esm2022/index.mjs +1 -1
- package/esm2022/lib/container/container.component.mjs +15 -16
- package/esm2022/lib/get-o-auth-profile.method.mjs +9 -10
- package/esm2022/lib/loading/loading.component.mjs +7 -8
- package/esm2022/lib/o-auth-extract.guard.mjs +10 -9
- package/esm2022/lib/o-auth-redirect.guard.mjs +6 -7
- package/esm2022/lib/o-auth.method.mjs +12 -13
- package/esm2022/lib/o-auth.module.mjs +14 -14
- package/esm2022/lib/o-auth.service.mjs +32 -33
- package/esm2022/lib/profile.resolve.mjs +6 -7
- package/esm2022/lib/routes.mjs +7 -7
- package/esm2022/lib/sign-in-with-redirect/sign-in-with-redirect.component.mjs +14 -15
- package/esm2022/lib/tokens.mjs +3 -3
- package/esm2022/rxap-oauth.mjs +1 -1
- package/esm2022/single-sign-on/index.mjs +8 -0
- package/esm2022/single-sign-on/lib/continue/continue.component.mjs +20 -21
- package/esm2022/single-sign-on/lib/error/error.component.mjs +11 -12
- package/esm2022/single-sign-on/lib/o-auth-single-sign-on-routing.module.mjs +13 -14
- package/esm2022/single-sign-on/lib/o-auth-single-sign-on.guard.mjs +9 -10
- package/esm2022/single-sign-on/lib/o-auth-single-sign-on.service.mjs +7 -8
- package/esm2022/single-sign-on/lib/routes.mjs +10 -10
- package/esm2022/single-sign-on/lib/tokens.mjs +2 -2
- package/esm2022/single-sign-on/rxap-oauth-single-sign-on.mjs +2 -2
- package/fesm2022/rxap-oauth-single-sign-on.mjs +44 -44
- package/fesm2022/rxap-oauth-single-sign-on.mjs.map +1 -1
- package/fesm2022/rxap-oauth.mjs +94 -93
- package/fesm2022/rxap-oauth.mjs.map +1 -1
- package/lib/get-o-auth-profile.method.d.ts +1 -1
- package/lib/o-auth-extract.guard.d.ts +1 -1
- package/lib/o-auth.method.d.ts +2 -2
- package/lib/o-auth.service.d.ts +3 -3
- package/package.json +47 -53
- package/single-sign-on/index.d.ts +7 -5
- package/single-sign-on/lib/o-auth-single-sign-on.service.d.ts +1 -1
- package/single-sign-on/src/lib/continue/_continue.component.theme.scss +39 -0
- package/single-sign-on/src/lib/error/_error.component.theme.scss +34 -0
- package/src/lib/container/_container.component.theme.scss +28 -0
- package/src/lib/sign-in-with-redirect/_sign-in-with-redirect.component.theme.scss +31 -0
- package/LICENSE +0 -27
- package/collection.json +0 -10
- package/esm2022/single-sign-on/public_api.mjs +0 -8
- package/migration.json +0 -4
- package/single-sign-on/public_api.d.ts +0 -7
- package/src/schematics/ng-add/index.d.ts +0 -2
- package/src/schematics/ng-add/index.js +0 -8
- package/src/schematics/ng-add/index.js.map +0 -1
- package/src/schematics/ng-add/schema.json +0 -7
package/fesm2022/rxap-oauth.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, Injectable, Inject, Optional, NgModule, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
4
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
|
+
import { firstValueFrom, ReplaySubject } from 'rxjs';
|
|
5
6
|
import * as i1$1 from '@angular/router';
|
|
6
7
|
import { Router, RouterOutlet } from '@angular/router';
|
|
7
|
-
import { ReplaySubject } from 'rxjs';
|
|
8
8
|
import { AuthenticationEventType } from '@rxap/authentication';
|
|
9
9
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
10
10
|
import * as i1$2 from '@angular/material/progress-bar';
|
|
@@ -27,19 +27,18 @@ class GetOAuthProfileMethod {
|
|
|
27
27
|
if (!profileEndpoint) {
|
|
28
28
|
throw new Error('The profile endpoint is not defined');
|
|
29
29
|
}
|
|
30
|
-
return this.http
|
|
30
|
+
return firstValueFrom(this.http
|
|
31
31
|
.get(profileEndpoint, {
|
|
32
32
|
headers: {
|
|
33
33
|
Authorization: `Bearer ${parameters.accessToken}`,
|
|
34
34
|
},
|
|
35
35
|
withCredentials: parameters.withCredentials ?? true,
|
|
36
|
-
})
|
|
37
|
-
.toPromise();
|
|
36
|
+
}));
|
|
38
37
|
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
40
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GetOAuthProfileMethod, deps: [{ token: HttpClient }, { token: PROFILE_AUTH_ENDPOINT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
39
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GetOAuthProfileMethod, providedIn: 'root' }); }
|
|
41
40
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GetOAuthProfileMethod, decorators: [{
|
|
43
42
|
type: Injectable,
|
|
44
43
|
args: [{ providedIn: 'root' }]
|
|
45
44
|
}], ctorParameters: function () { return [{ type: i1.HttpClient, decorators: [{
|
|
@@ -58,8 +57,8 @@ function IsOAuthMethodWithRefreshTokenParameters(parameters) {
|
|
|
58
57
|
}
|
|
59
58
|
function IsOAuthMethodWithUsernamePasswordParameters(parameters) {
|
|
60
59
|
// eslint-disable-next-line no-prototype-builtins
|
|
61
|
-
return (parameters
|
|
62
|
-
parameters
|
|
60
|
+
return (!!parameters['username'] &&
|
|
61
|
+
!!parameters['password']);
|
|
63
62
|
}
|
|
64
63
|
function AssertOAuthMethodWithUsernamePasswordParameters(parameters) {
|
|
65
64
|
if (!IsOAuthMethodWithUsernamePasswordParameters(parameters)) {
|
|
@@ -128,12 +127,11 @@ class OAuthMethod {
|
|
|
128
127
|
else {
|
|
129
128
|
headers = headers.append('Authorization', `Basic ${parameters.secret}`);
|
|
130
129
|
}
|
|
131
|
-
const response = await this.http
|
|
130
|
+
const response = await firstValueFrom(this.http
|
|
132
131
|
.post(parameters.authEndpoint, params.toString(), {
|
|
133
132
|
headers,
|
|
134
133
|
withCredentials: parameters.withCredentials ?? true,
|
|
135
|
-
})
|
|
136
|
-
.toPromise();
|
|
134
|
+
}));
|
|
137
135
|
return {
|
|
138
136
|
accessToken: response.access_token,
|
|
139
137
|
refreshToken: response.refresh_token,
|
|
@@ -153,10 +151,10 @@ class OAuthMethod {
|
|
|
153
151
|
}
|
|
154
152
|
throw new Error('Could not guess the grant type');
|
|
155
153
|
}
|
|
156
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
157
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
154
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthMethod, deps: [{ token: HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
155
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthMethod, providedIn: 'root' }); }
|
|
158
156
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthMethod, decorators: [{
|
|
160
158
|
type: Injectable,
|
|
161
159
|
args: [{ providedIn: 'root' }]
|
|
162
160
|
}], ctorParameters: function () { return [{ type: i1.HttpClient, decorators: [{
|
|
@@ -169,7 +167,7 @@ function DefaultRedirectSignInFactory() {
|
|
|
169
167
|
}
|
|
170
168
|
const RXAP_O_AUTH_REDIRECT_SIGN_IN = new InjectionToken('rxap/o-auth/redirect-sign-in', {
|
|
171
169
|
providedIn: 'root',
|
|
172
|
-
factory: DefaultRedirectSignInFactory
|
|
170
|
+
factory: DefaultRedirectSignInFactory,
|
|
173
171
|
});
|
|
174
172
|
const RXAP_O_AUTH_REDIRECT_SIGN_OUT = new InjectionToken('rxap/o-auth/redirect-sign-out');
|
|
175
173
|
function DefaultRedirectUrl() {
|
|
@@ -177,7 +175,7 @@ function DefaultRedirectUrl() {
|
|
|
177
175
|
}
|
|
178
176
|
const RXAP_O_AUTH_REDIRECT_URL = new InjectionToken('rxap/o-auth/redirect-url', {
|
|
179
177
|
providedIn: 'root',
|
|
180
|
-
factory: DefaultRedirectUrl
|
|
178
|
+
factory: DefaultRedirectUrl,
|
|
181
179
|
});
|
|
182
180
|
|
|
183
181
|
const OAUTH_SECRET = new InjectionToken('OAUTH_SECRET');
|
|
@@ -189,6 +187,20 @@ const REFRESH_TOKEN_LOCAL_STORAGE_KEY = 'refresh_token';
|
|
|
189
187
|
const EXPIRES_AT_LOCAL_STORAGE_KEY = 'expires_at';
|
|
190
188
|
const REMEMBER_LOCAL_STORAGE_KEY = 'remember';
|
|
191
189
|
class OAuthService {
|
|
190
|
+
constructor(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint = null, authEndpoint = null, secret = null, ssoUrl = null, redirectSignOut = null, redirectUrl = null, clientId = null) {
|
|
191
|
+
this.oAuthMethod = oAuthMethod;
|
|
192
|
+
this.getOAuthProfileMethod = getOAuthProfileMethod;
|
|
193
|
+
this.router = router;
|
|
194
|
+
this.profileEndpoint = profileEndpoint;
|
|
195
|
+
this.authEndpoint = authEndpoint;
|
|
196
|
+
this.secret = secret;
|
|
197
|
+
this.ssoUrl = ssoUrl;
|
|
198
|
+
this.redirectSignOut = redirectSignOut;
|
|
199
|
+
this.redirectUrl = redirectUrl;
|
|
200
|
+
this.clientId = clientId;
|
|
201
|
+
this.events$ = new ReplaySubject();
|
|
202
|
+
this._isAuthenticated = null;
|
|
203
|
+
}
|
|
192
204
|
get expiresAt() {
|
|
193
205
|
const expiresAt = this.getItem(EXPIRES_AT_LOCAL_STORAGE_KEY);
|
|
194
206
|
if (expiresAt) {
|
|
@@ -250,20 +262,6 @@ class OAuthService {
|
|
|
250
262
|
get profile() {
|
|
251
263
|
return this._profile;
|
|
252
264
|
}
|
|
253
|
-
constructor(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint = null, authEndpoint = null, secret = null, ssoUrl = null, redirectSignOut = null, redirectUrl = null, clientId = null) {
|
|
254
|
-
this.oAuthMethod = oAuthMethod;
|
|
255
|
-
this.getOAuthProfileMethod = getOAuthProfileMethod;
|
|
256
|
-
this.router = router;
|
|
257
|
-
this.profileEndpoint = profileEndpoint;
|
|
258
|
-
this.authEndpoint = authEndpoint;
|
|
259
|
-
this.secret = secret;
|
|
260
|
-
this.ssoUrl = ssoUrl;
|
|
261
|
-
this.redirectSignOut = redirectSignOut;
|
|
262
|
-
this.redirectUrl = redirectUrl;
|
|
263
|
-
this.clientId = clientId;
|
|
264
|
-
this.events$ = new ReplaySubject();
|
|
265
|
-
this._isAuthenticated = null;
|
|
266
|
-
}
|
|
267
265
|
signInWithRedirect(lastUrl) {
|
|
268
266
|
if (!this.redirectUrl) {
|
|
269
267
|
throw new Error('Redirect url is not defined');
|
|
@@ -331,7 +329,7 @@ class OAuthService {
|
|
|
331
329
|
password: password,
|
|
332
330
|
authEndpoint: this.authEndpoint,
|
|
333
331
|
secret: this.secret,
|
|
334
|
-
clientId: this.clientId ?? undefined
|
|
332
|
+
clientId: this.clientId ?? undefined,
|
|
335
333
|
}).catch(e => {
|
|
336
334
|
this.events$.next({ type: AuthenticationEventType.OnAuthError });
|
|
337
335
|
throw e;
|
|
@@ -348,7 +346,7 @@ class OAuthService {
|
|
|
348
346
|
try {
|
|
349
347
|
profile = await this.getOAuthProfileMethod.call({
|
|
350
348
|
accessToken: this.accessToken,
|
|
351
|
-
profileEndpoint: this.profileEndpoint
|
|
349
|
+
profileEndpoint: this.profileEndpoint,
|
|
352
350
|
});
|
|
353
351
|
}
|
|
354
352
|
catch (e) {
|
|
@@ -403,6 +401,12 @@ class OAuthService {
|
|
|
403
401
|
this._isAuthenticated = true;
|
|
404
402
|
this.events$.next({ type: AuthenticationEventType.OnAuthSuccess });
|
|
405
403
|
}
|
|
404
|
+
clearStorage() {
|
|
405
|
+
this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);
|
|
406
|
+
this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);
|
|
407
|
+
this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);
|
|
408
|
+
this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);
|
|
409
|
+
}
|
|
406
410
|
getKey(key) {
|
|
407
411
|
return [this.secret, key].join('__');
|
|
408
412
|
}
|
|
@@ -415,12 +419,6 @@ class OAuthService {
|
|
|
415
419
|
removeItem(key) {
|
|
416
420
|
localStorage.removeItem(this.getKey(key));
|
|
417
421
|
}
|
|
418
|
-
clearStorage() {
|
|
419
|
-
this.removeItem(ACCESS_TOKEN_LOCAL_STORAGE_KEY);
|
|
420
|
-
this.removeItem(REFRESH_TOKEN_LOCAL_STORAGE_KEY);
|
|
421
|
-
this.removeItem(REMEMBER_LOCAL_STORAGE_KEY);
|
|
422
|
-
this.removeItem(EXPIRES_AT_LOCAL_STORAGE_KEY);
|
|
423
|
-
}
|
|
424
422
|
async signInWithRefreshToken(refreshToken) {
|
|
425
423
|
if (!this.secret) {
|
|
426
424
|
throw new Error('The oauth secret is not defined');
|
|
@@ -437,10 +435,10 @@ class OAuthService {
|
|
|
437
435
|
this.authenticated(response);
|
|
438
436
|
return response;
|
|
439
437
|
}
|
|
440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
441
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
438
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthService, deps: [{ token: OAuthMethod }, { token: GetOAuthProfileMethod }, { token: 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 }, { token: OAUTH_CLIENT_ID, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
439
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthService, providedIn: 'root' }); }
|
|
442
440
|
}
|
|
443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthService, decorators: [{
|
|
444
442
|
type: Injectable,
|
|
445
443
|
args: [{ providedIn: 'root' }]
|
|
446
444
|
}], ctorParameters: function () { return [{ type: OAuthMethod, decorators: [{
|
|
@@ -495,7 +493,9 @@ class OAuthExtractGuard {
|
|
|
495
493
|
this.oAuthService = oAuthService;
|
|
496
494
|
}
|
|
497
495
|
canActivate(route) {
|
|
498
|
-
if (route.queryParamMap.has('accessToken') &&
|
|
496
|
+
if (route.queryParamMap.has('accessToken') &&
|
|
497
|
+
route.queryParamMap.has('refreshToken') &&
|
|
498
|
+
route.queryParamMap.has('expiresIn')) {
|
|
499
499
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
500
500
|
const accessToken = route.queryParamMap.get('accessToken');
|
|
501
501
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -508,7 +508,7 @@ class OAuthExtractGuard {
|
|
|
508
508
|
accessToken,
|
|
509
509
|
refreshToken,
|
|
510
510
|
expiresIn,
|
|
511
|
-
expiresAt
|
|
511
|
+
expiresAt,
|
|
512
512
|
}, true);
|
|
513
513
|
let redirectUrl = '/';
|
|
514
514
|
if (payloadBase64) {
|
|
@@ -530,10 +530,10 @@ class OAuthExtractGuard {
|
|
|
530
530
|
}
|
|
531
531
|
return this.router.createUrlTree([...route.url.map(url => url.path), 'redirect']);
|
|
532
532
|
}
|
|
533
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
534
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
533
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthExtractGuard, deps: [{ token: i1$1.Router }, { token: OAuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
534
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthExtractGuard, providedIn: 'root' }); }
|
|
535
535
|
}
|
|
536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthExtractGuard, decorators: [{
|
|
537
537
|
type: Injectable,
|
|
538
538
|
args: [{ providedIn: 'root' }]
|
|
539
539
|
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: OAuthService }]; } });
|
|
@@ -554,10 +554,10 @@ class OAuthRedirectGuard {
|
|
|
554
554
|
canActivateChild(childRoute, state) {
|
|
555
555
|
return this.canActivate(childRoute, state);
|
|
556
556
|
}
|
|
557
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
558
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
557
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthRedirectGuard, deps: [{ token: OAuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
558
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthRedirectGuard, providedIn: 'root' }); }
|
|
559
559
|
}
|
|
560
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthRedirectGuard, decorators: [{
|
|
561
561
|
type: Injectable,
|
|
562
562
|
args: [{ providedIn: 'root' }]
|
|
563
563
|
}], ctorParameters: function () { return [{ type: OAuthService, decorators: [{
|
|
@@ -572,64 +572,65 @@ class OAuthModule {
|
|
|
572
572
|
providers: [
|
|
573
573
|
{
|
|
574
574
|
provide: RXAP_O_AUTH_REDIRECT_SIGN_IN,
|
|
575
|
-
useValue: options.signInPath ?? ['/', 'oauth', 'redirect']
|
|
575
|
+
useValue: options.signInPath ?? ['/', 'oauth', 'redirect'],
|
|
576
576
|
},
|
|
577
577
|
{
|
|
578
578
|
provide: RXAP_O_AUTH_REDIRECT_SIGN_OUT,
|
|
579
|
-
useValue: options.signOutPath ?? null
|
|
580
|
-
}
|
|
581
|
-
]
|
|
579
|
+
useValue: options.signOutPath ?? null,
|
|
580
|
+
},
|
|
581
|
+
],
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
585
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.
|
|
586
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.
|
|
584
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
585
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: OAuthModule }); }
|
|
586
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthModule }); }
|
|
587
587
|
}
|
|
588
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
589
|
-
type: NgModule
|
|
588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: OAuthModule, decorators: [{
|
|
589
|
+
type: NgModule,
|
|
590
|
+
args: [{}]
|
|
590
591
|
}] });
|
|
591
592
|
|
|
592
593
|
class ContainerComponent {
|
|
593
594
|
prepareRoute(outlet) {
|
|
594
595
|
return outlet.isActivated ? outlet.activatedRoute : 'true';
|
|
595
596
|
}
|
|
596
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
597
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
597
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
598
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ContainerComponent, isStandalone: true, selector: "rxap-container", host: { classAttribute: "rxap-container" }, ngImport: i0, 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}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], animations: [
|
|
598
599
|
trigger('routeAnimations', [
|
|
599
600
|
transition(':enter', [
|
|
600
601
|
style({ opacity: 0 }),
|
|
601
|
-
animate('512ms', style({ opacity: 1 }))
|
|
602
|
+
animate('512ms', style({ opacity: 1 })),
|
|
602
603
|
]),
|
|
603
604
|
transition(':leave', [
|
|
604
605
|
style({ opacity: 1 }),
|
|
605
|
-
animate('512ms', style({ opacity: 0 }))
|
|
606
|
-
])
|
|
607
|
-
])
|
|
606
|
+
animate('512ms', style({ opacity: 0 })),
|
|
607
|
+
]),
|
|
608
|
+
]),
|
|
608
609
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
609
610
|
}
|
|
610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ContainerComponent, decorators: [{
|
|
611
612
|
type: Component,
|
|
612
613
|
args: [{ selector: 'rxap-container', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-container' }, animations: [
|
|
613
614
|
trigger('routeAnimations', [
|
|
614
615
|
transition(':enter', [
|
|
615
616
|
style({ opacity: 0 }),
|
|
616
|
-
animate('512ms', style({ opacity: 1 }))
|
|
617
|
+
animate('512ms', style({ opacity: 1 })),
|
|
617
618
|
]),
|
|
618
619
|
transition(':leave', [
|
|
619
620
|
style({ opacity: 1 }),
|
|
620
|
-
animate('512ms', style({ opacity: 0 }))
|
|
621
|
-
])
|
|
622
|
-
])
|
|
621
|
+
animate('512ms', style({ opacity: 0 })),
|
|
622
|
+
]),
|
|
623
|
+
]),
|
|
623
624
|
], standalone: true, imports: [RouterOutlet], 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}\n"] }]
|
|
624
625
|
}] });
|
|
625
626
|
|
|
626
627
|
class LoadingComponent {
|
|
627
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
628
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
629
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: LoadingComponent, isStandalone: true, selector: "rxap-loading", ngImport: i0, template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
629
630
|
}
|
|
630
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LoadingComponent, decorators: [{
|
|
631
632
|
type: Component,
|
|
632
|
-
args: [{ selector: 'rxap-loading', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
633
|
+
args: [{ selector: 'rxap-loading', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatProgressBarModule], template: "<mat-progress-bar class=\"loading-bar\" mode=\"indeterminate\"></mat-progress-bar>\n" }]
|
|
633
634
|
}] });
|
|
634
635
|
|
|
635
636
|
class SignInWithRedirectComponent {
|
|
@@ -639,22 +640,22 @@ class SignInWithRedirectComponent {
|
|
|
639
640
|
signIn() {
|
|
640
641
|
this.authService.signInWithRedirect();
|
|
641
642
|
}
|
|
642
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
643
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
643
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SignInWithRedirectComponent, deps: [{ token: OAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
644
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: SignInWithRedirectComponent, isStandalone: true, selector: "rxap-sign-in-with-redirect", host: { classAttribute: "rxap-sign-in-with-redirect" }, ngImport: i0, template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n 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}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i2.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"] }, { kind: "directive", type: i2.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"] }, { kind: "directive", type: i2.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"] }, { kind: "directive", type: i2.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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], animations: [
|
|
644
645
|
trigger('fadeAnimation', [
|
|
645
646
|
// the "in" style determines the "resting" state of the element when it is visible.
|
|
646
647
|
state('in', style({ opacity: 1 })),
|
|
647
648
|
// fade in when created. this could also be written as transition('void => *')
|
|
648
649
|
transition(':enter', [
|
|
649
650
|
style({ opacity: 0 }),
|
|
650
|
-
animate(300)
|
|
651
|
+
animate(300),
|
|
651
652
|
]),
|
|
652
653
|
// fade out when destroyed. this could also be written as transition('void => *')
|
|
653
|
-
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
654
|
-
])
|
|
654
|
+
transition(':leave', animate(300, style({ opacity: 0 }))),
|
|
655
|
+
]),
|
|
655
656
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
656
657
|
}
|
|
657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SignInWithRedirectComponent, decorators: [{
|
|
658
659
|
type: Component,
|
|
659
660
|
args: [{ selector: 'rxap-sign-in-with-redirect', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-sign-in-with-redirect' }, animations: [
|
|
660
661
|
trigger('fadeAnimation', [
|
|
@@ -663,12 +664,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
|
663
664
|
// fade in when created. this could also be written as transition('void => *')
|
|
664
665
|
transition(':enter', [
|
|
665
666
|
style({ opacity: 0 }),
|
|
666
|
-
animate(300)
|
|
667
|
+
animate(300),
|
|
667
668
|
]),
|
|
668
669
|
// fade out when destroyed. this could also be written as transition('void => *')
|
|
669
|
-
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
670
|
-
])
|
|
671
|
-
], standalone: true, imports: [FlexModule, MatIconModule, MatButtonModule], template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"
|
|
670
|
+
transition(':leave', animate(300, style({ opacity: 0 }))),
|
|
671
|
+
]),
|
|
672
|
+
], standalone: true, imports: [FlexModule, MatIconModule, MatButtonModule], template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n 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}\n"] }]
|
|
672
673
|
}], ctorParameters: function () { return [{ type: OAuthService }]; } });
|
|
673
674
|
|
|
674
675
|
const RXAP_O_AUTH_ROUTES = [
|
|
@@ -678,19 +679,19 @@ const RXAP_O_AUTH_ROUTES = [
|
|
|
678
679
|
children: [
|
|
679
680
|
{
|
|
680
681
|
path: 'redirect',
|
|
681
|
-
component: SignInWithRedirectComponent
|
|
682
|
+
component: SignInWithRedirectComponent,
|
|
682
683
|
},
|
|
683
684
|
{
|
|
684
685
|
canActivate: [OAuthExtractGuard],
|
|
685
686
|
path: '',
|
|
686
|
-
component: LoadingComponent
|
|
687
|
+
component: LoadingComponent,
|
|
687
688
|
},
|
|
688
689
|
{
|
|
689
690
|
path: '**',
|
|
690
|
-
redirectTo: ''
|
|
691
|
-
}
|
|
692
|
-
]
|
|
693
|
-
}
|
|
691
|
+
redirectTo: '',
|
|
692
|
+
},
|
|
693
|
+
],
|
|
694
|
+
},
|
|
694
695
|
];
|
|
695
696
|
|
|
696
697
|
class ProfileResolve {
|
|
@@ -706,10 +707,10 @@ class ProfileResolve {
|
|
|
706
707
|
}
|
|
707
708
|
return profile;
|
|
708
709
|
}
|
|
709
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
710
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
710
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ProfileResolve, deps: [{ token: OAuthService }, { token: Router }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
711
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ProfileResolve, providedIn: 'root' }); }
|
|
711
712
|
}
|
|
712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ProfileResolve, decorators: [{
|
|
713
714
|
type: Injectable,
|
|
714
715
|
args: [{ providedIn: 'root' }]
|
|
715
716
|
}], ctorParameters: function () { return [{ type: OAuthService, decorators: [{
|