@rxap/oauth 16.0.0-dev.2 → 16.0.0-dev.21
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 +488 -0
- package/LICENSE +621 -27
- package/LICENSE.md +621 -0
- package/README.md +7 -22
- package/esm2022/index.mjs +6 -13
- package/esm2022/lib/authentication-guard.mjs +15 -0
- package/esm2022/lib/authentication.service.mjs +83 -0
- package/esm2022/lib/provide-auth.mjs +20 -0
- package/esm2022/rxap-oauth.mjs +1 -1
- package/fesm2022/rxap-oauth.mjs +94 -703
- package/fesm2022/rxap-oauth.mjs.map +1 -1
- package/index.d.ts +3 -12
- package/lib/authentication-guard.d.ts +2 -0
- package/lib/authentication.service.d.ts +16 -0
- package/lib/provide-auth.d.ts +4 -0
- package/package.json +56 -63
- package/theme.css +1 -0
- package/collection.json +0 -10
- package/esm2022/lib/container/container.component.mjs +0 -39
- package/esm2022/lib/get-o-auth-profile.method.mjs +0 -41
- package/esm2022/lib/loading/loading.component.mjs +0 -14
- package/esm2022/lib/o-auth-extract.guard.mjs +0 -56
- package/esm2022/lib/o-auth-redirect.guard.mjs +0 -32
- package/esm2022/lib/o-auth.method.mjs +0 -117
- package/esm2022/lib/o-auth.module.mjs +0 -28
- package/esm2022/lib/o-auth.service.mjs +0 -321
- package/esm2022/lib/profile.resolve.mjs +0 -38
- package/esm2022/lib/routes.mjs +0 -26
- package/esm2022/lib/sign-in-with-redirect/sign-in-with-redirect.component.mjs +0 -51
- package/esm2022/lib/tokens.mjs +0 -17
- package/esm2022/single-sign-on/lib/continue/continue.component.mjs +0 -79
- package/esm2022/single-sign-on/lib/error/error.component.mjs +0 -47
- package/esm2022/single-sign-on/lib/o-auth-single-sign-on-routing.module.mjs +0 -37
- package/esm2022/single-sign-on/lib/o-auth-single-sign-on.guard.mjs +0 -70
- package/esm2022/single-sign-on/lib/o-auth-single-sign-on.service.mjs +0 -78
- package/esm2022/single-sign-on/lib/routes.mjs +0 -33
- package/esm2022/single-sign-on/lib/tokens.mjs +0 -10
- package/esm2022/single-sign-on/public_api.mjs +0 -8
- package/esm2022/single-sign-on/rxap-oauth-single-sign-on.mjs +0 -5
- package/fesm2022/rxap-oauth-single-sign-on.mjs +0 -325
- package/fesm2022/rxap-oauth-single-sign-on.mjs.map +0 -1
- package/lib/container/container.component.d.ts +0 -7
- package/lib/get-o-auth-profile.method.d.ts +0 -18
- package/lib/loading/loading.component.d.ts +0 -5
- package/lib/o-auth-extract.guard.d.ts +0 -11
- package/lib/o-auth-redirect.guard.d.ts +0 -11
- package/lib/o-auth.method.d.ts +0 -45
- package/lib/o-auth.module.d.ts +0 -12
- package/lib/o-auth.service.d.ts +0 -64
- package/lib/profile.resolve.d.ts +0 -12
- package/lib/routes.d.ts +0 -2
- package/lib/sign-in-with-redirect/sign-in-with-redirect.component.d.ts +0 -9
- package/lib/tokens.d.ts +0 -6
- package/migration.json +0 -4
- package/single-sign-on/index.d.ts +0 -5
- package/single-sign-on/lib/continue/continue.component.d.ts +0 -17
- package/single-sign-on/lib/error/error.component.d.ts +0 -7
- package/single-sign-on/lib/o-auth-single-sign-on-routing.module.d.ts +0 -11
- package/single-sign-on/lib/o-auth-single-sign-on.guard.d.ts +0 -14
- package/single-sign-on/lib/o-auth-single-sign-on.service.d.ts +0 -13
- package/single-sign-on/lib/routes.d.ts +0 -2
- package/single-sign-on/lib/tokens.d.ts +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
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Inject, Optional, Component, ChangeDetectionStrategy, InjectionToken, NgModule } from '@angular/core';
|
|
3
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
4
|
-
import * as i3 from '@angular/router';
|
|
5
|
-
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
|
-
import { take, map } from 'rxjs/operators';
|
|
7
|
-
import * as i1 from '@rxap/oauth';
|
|
8
|
-
import { OAuthService, OAuthMethod, GetOAuthProfileMethod, PROFILE_AUTH_ENDPOINT, OAUTH_AUTH_ENDPOINT, OAUTH_SECRET, OAUTH_SSO_URL, RXAP_O_AUTH_REDIRECT_SIGN_OUT, RXAP_O_AUTH_REDIRECT_URL, RXAP_O_AUTH_REDIRECT_SIGN_IN, ContainerComponent, ProfileResolve, LoadingComponent } from '@rxap/oauth';
|
|
9
|
-
import * as i2 from '@angular/material/button';
|
|
10
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
-
import { AvatarBackgroundImageDirective } from '@rxap/directives';
|
|
12
|
-
import { NgIf, AsyncPipe } from '@angular/common';
|
|
13
|
-
import * as i1$1 from '@angular/flex-layout/flex';
|
|
14
|
-
import { FlexModule } from '@angular/flex-layout/flex';
|
|
15
|
-
|
|
16
|
-
class OAuthSingleSignOnService extends OAuthService {
|
|
17
|
-
// It is required to define the constructor with the injection
|
|
18
|
-
// definition. If not defined the constructor will be created by
|
|
19
|
-
// typescript without an parameters, bc the payload and redirect
|
|
20
|
-
// initialization is done in the constructor.
|
|
21
|
-
constructor(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint = null, authEndpoint = null, secret = null, ssoUrl = null, redirectSignOut = null, redirectUrl = null) {
|
|
22
|
-
super(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint, authEndpoint, secret, ssoUrl, redirectSignOut, redirectUrl);
|
|
23
|
-
this.payload = null;
|
|
24
|
-
this.redirect = null;
|
|
25
|
-
}
|
|
26
|
-
async signInWithEmailAndPassword(email, password, remember) {
|
|
27
|
-
const response = await super.signInWithEmailAndPassword(email, password, remember);
|
|
28
|
-
this.redirectToClient();
|
|
29
|
-
return response;
|
|
30
|
-
}
|
|
31
|
-
redirectToClient() {
|
|
32
|
-
window.location.replace(`${this.redirect}?accessToken=${this.accessToken}&refreshToken=${this.refreshToken}&expiresIn=${this.expiresIn}&payload=${this.payload}`);
|
|
33
|
-
}
|
|
34
|
-
async signOut() {
|
|
35
|
-
this.clearStorage();
|
|
36
|
-
this.accessToken = null;
|
|
37
|
-
this.refreshToken = null;
|
|
38
|
-
this.expiresAt = null;
|
|
39
|
-
this._isAuthenticated = false;
|
|
40
|
-
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnService, 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 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
42
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnService }); }
|
|
43
|
-
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnService, decorators: [{
|
|
45
|
-
type: Injectable
|
|
46
|
-
}], ctorParameters: function () { return [{ type: i1.OAuthMethod, decorators: [{
|
|
47
|
-
type: Inject,
|
|
48
|
-
args: [OAuthMethod]
|
|
49
|
-
}] }, { type: i1.GetOAuthProfileMethod, decorators: [{
|
|
50
|
-
type: Inject,
|
|
51
|
-
args: [GetOAuthProfileMethod]
|
|
52
|
-
}] }, { type: i3.Router, decorators: [{
|
|
53
|
-
type: Inject,
|
|
54
|
-
args: [Router]
|
|
55
|
-
}] }, { type: undefined, decorators: [{
|
|
56
|
-
type: Optional
|
|
57
|
-
}, {
|
|
58
|
-
type: Inject,
|
|
59
|
-
args: [PROFILE_AUTH_ENDPOINT]
|
|
60
|
-
}] }, { type: undefined, decorators: [{
|
|
61
|
-
type: Optional
|
|
62
|
-
}, {
|
|
63
|
-
type: Inject,
|
|
64
|
-
args: [OAUTH_AUTH_ENDPOINT]
|
|
65
|
-
}] }, { type: undefined, decorators: [{
|
|
66
|
-
type: Optional
|
|
67
|
-
}, {
|
|
68
|
-
type: Inject,
|
|
69
|
-
args: [OAUTH_SECRET]
|
|
70
|
-
}] }, { type: undefined, decorators: [{
|
|
71
|
-
type: Optional
|
|
72
|
-
}, {
|
|
73
|
-
type: Inject,
|
|
74
|
-
args: [OAUTH_SSO_URL]
|
|
75
|
-
}] }, { type: undefined, decorators: [{
|
|
76
|
-
type: Optional
|
|
77
|
-
}, {
|
|
78
|
-
type: Inject,
|
|
79
|
-
args: [RXAP_O_AUTH_REDIRECT_SIGN_OUT]
|
|
80
|
-
}] }, { type: undefined, decorators: [{
|
|
81
|
-
type: Optional
|
|
82
|
-
}, {
|
|
83
|
-
type: Inject,
|
|
84
|
-
args: [RXAP_O_AUTH_REDIRECT_URL]
|
|
85
|
-
}] }]; } });
|
|
86
|
-
|
|
87
|
-
class ContinueComponent {
|
|
88
|
-
constructor(route, router, oAuthService, redirectLogin) {
|
|
89
|
-
this.route = route;
|
|
90
|
-
this.router = router;
|
|
91
|
-
this.oAuthService = oAuthService;
|
|
92
|
-
this.redirectLogin = redirectLogin;
|
|
93
|
-
}
|
|
94
|
-
ngOnInit() {
|
|
95
|
-
this.profile = this.route.data
|
|
96
|
-
.pipe(take(1), map((data) => data.profile))
|
|
97
|
-
.toPromise();
|
|
98
|
-
}
|
|
99
|
-
signOut() {
|
|
100
|
-
this.oAuthService.signOut();
|
|
101
|
-
return this.router.navigate(this.redirectLogin);
|
|
102
|
-
}
|
|
103
|
-
redirect() {
|
|
104
|
-
this.oAuthService.redirectToClient();
|
|
105
|
-
}
|
|
106
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContinueComponent, deps: [{ token: ActivatedRoute }, { token: Router }, { token: OAuthService }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
107
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: ContinueComponent, isStandalone: true, selector: "rxap-continue", host: { classAttribute: "rxap-continue" }, 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 <div *ngIf=\"profile | async as p\" [name]=\"p.username\" [rxapAvatarBackgroundImage]=\"p.username\"\n class=\"avatar-icon\"></div>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <p><span i18n>Currently Sign In as:</span> <span class=\"username\"><br>{{(profile | async)?.username}}</span></p>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"8px\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"redirect()\" color=\"primary\" i18n mat-raised-button>Continue</button>\n </div>\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signOut()\" color=\"accent\" i18n mat-stroked-button>Change Account</button>\n </div>\n\n </div>\n\n </div>\n\n</div>\n", styles: [".inner{padding:64px;position:relative}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px;border-radius:100%}.inner .content .email-input,.inner .content .password-input{width:320px}.inner .content .email-input .prefix-icon,.inner .content .password-input .prefix-icon{width:24px;height:24px;display:flex;justify-content:center;align-items:center}.inner .content .email-input ::ng-deep .mat-form-field-prefix,.inner .content .password-input ::ng-deep .mat-form-field-prefix{align-self:flex-end;margin:4px}.inner .content [type=submit]{width:128px;text-transform:uppercase}.inner .loading-bar{position:absolute;inset:auto 0 0}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i1$1.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: i1$1.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: i1$1.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: i1$1.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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: AvatarBackgroundImageDirective, selector: "[rxapAvatarBackgroundImage]", inputs: ["name", "rxapAvatarBackgroundImage"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [
|
|
108
|
-
trigger('fadeAnimation', [
|
|
109
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
110
|
-
state('in', style({ opacity: 1 })),
|
|
111
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
112
|
-
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
113
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
114
|
-
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
115
|
-
])
|
|
116
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
117
|
-
}
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ContinueComponent, decorators: [{
|
|
119
|
-
type: Component,
|
|
120
|
-
args: [{ selector: 'rxap-continue', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-continue' }, animations: [
|
|
121
|
-
trigger('fadeAnimation', [
|
|
122
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
123
|
-
state('in', style({ opacity: 1 })),
|
|
124
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
125
|
-
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
126
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
127
|
-
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
128
|
-
])
|
|
129
|
-
], standalone: true, imports: [
|
|
130
|
-
FlexModule,
|
|
131
|
-
NgIf,
|
|
132
|
-
AvatarBackgroundImageDirective,
|
|
133
|
-
MatButtonModule,
|
|
134
|
-
AsyncPipe
|
|
135
|
-
], 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 <div *ngIf=\"profile | async as p\" [name]=\"p.username\" [rxapAvatarBackgroundImage]=\"p.username\"\n class=\"avatar-icon\"></div>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <p><span i18n>Currently Sign In as:</span> <span class=\"username\"><br>{{(profile | async)?.username}}</span></p>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"8px\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"redirect()\" color=\"primary\" i18n mat-raised-button>Continue</button>\n </div>\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signOut()\" color=\"accent\" i18n mat-stroked-button>Change Account</button>\n </div>\n\n </div>\n\n </div>\n\n</div>\n", styles: [".inner{padding:64px;position:relative}.inner .header .avatar-icon{width:100px;height:100px;font-size:100px;border-radius:100%}.inner .content .email-input,.inner .content .password-input{width:320px}.inner .content .email-input .prefix-icon,.inner .content .password-input .prefix-icon{width:24px;height:24px;display:flex;justify-content:center;align-items:center}.inner .content .email-input ::ng-deep .mat-form-field-prefix,.inner .content .password-input ::ng-deep .mat-form-field-prefix{align-self:flex-end;margin:4px}.inner .content [type=submit]{width:128px;text-transform:uppercase}.inner .loading-bar{position:absolute;inset:auto 0 0}\n"] }]
|
|
136
|
-
}], ctorParameters: function () { return [{ type: i3.ActivatedRoute, decorators: [{
|
|
137
|
-
type: Inject,
|
|
138
|
-
args: [ActivatedRoute]
|
|
139
|
-
}] }, { type: i3.Router, decorators: [{
|
|
140
|
-
type: Inject,
|
|
141
|
-
args: [Router]
|
|
142
|
-
}] }, { type: OAuthSingleSignOnService, decorators: [{
|
|
143
|
-
type: Inject,
|
|
144
|
-
args: [OAuthService]
|
|
145
|
-
}] }, { type: undefined, decorators: [{
|
|
146
|
-
type: Inject,
|
|
147
|
-
args: [RXAP_O_AUTH_REDIRECT_SIGN_IN]
|
|
148
|
-
}] }]; } });
|
|
149
|
-
|
|
150
|
-
function DefaultRedirectContinueFactory() {
|
|
151
|
-
return ['/', 'continue'];
|
|
152
|
-
}
|
|
153
|
-
const RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue', {
|
|
154
|
-
providedIn: 'root',
|
|
155
|
-
factory: DefaultRedirectContinueFactory
|
|
156
|
-
});
|
|
157
|
-
const RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue-disabled');
|
|
158
|
-
|
|
159
|
-
class OAuthSingleSignOnGuard {
|
|
160
|
-
constructor(authentication, router, redirectContinue, redirectLogin, redirectContinueDisabled) {
|
|
161
|
-
this.authentication = authentication;
|
|
162
|
-
this.router = router;
|
|
163
|
-
this.redirectContinue = redirectContinue;
|
|
164
|
-
this.redirectLogin = redirectLogin;
|
|
165
|
-
this.redirectContinueDisabled = redirectContinueDisabled;
|
|
166
|
-
}
|
|
167
|
-
async canActivate(route) {
|
|
168
|
-
const redirect = route.queryParamMap.get('redirect');
|
|
169
|
-
const secret = route.queryParamMap.get('secret');
|
|
170
|
-
const payload = route.queryParamMap.get('payload');
|
|
171
|
-
const action = route.queryParamMap.get('action');
|
|
172
|
-
if (!redirect || !secret) {
|
|
173
|
-
console.warn(`The query params 'redirect' or 'secret' is not defined!`);
|
|
174
|
-
return this.router.createUrlTree(['error']);
|
|
175
|
-
}
|
|
176
|
-
this.authentication.redirect = atob(redirect);
|
|
177
|
-
this.authentication.payload = payload;
|
|
178
|
-
this.authentication.secret = secret;
|
|
179
|
-
if (action) {
|
|
180
|
-
if (action === 'signOut') {
|
|
181
|
-
await this.authentication.signOut();
|
|
182
|
-
return this.router.createUrlTree(this.redirectLogin);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
const isAuthenticated = await this.authentication.isAuthenticated();
|
|
186
|
-
console.log('isAuthenticated', isAuthenticated);
|
|
187
|
-
if (isAuthenticated) {
|
|
188
|
-
if (this.redirectContinueDisabled) {
|
|
189
|
-
this.authentication.redirectToClient();
|
|
190
|
-
return true;
|
|
191
|
-
}
|
|
192
|
-
return this.router.createUrlTree(this.redirectContinue);
|
|
193
|
-
}
|
|
194
|
-
return this.router.createUrlTree(this.redirectLogin);
|
|
195
|
-
}
|
|
196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnGuard, deps: [{ token: OAuthService }, { token: Router }, { token: RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }, { token: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
197
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnGuard }); }
|
|
198
|
-
}
|
|
199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnGuard, decorators: [{
|
|
200
|
-
type: Injectable
|
|
201
|
-
}], ctorParameters: function () { return [{ type: OAuthSingleSignOnService, decorators: [{
|
|
202
|
-
type: Inject,
|
|
203
|
-
args: [OAuthService]
|
|
204
|
-
}] }, { type: i3.Router, decorators: [{
|
|
205
|
-
type: Inject,
|
|
206
|
-
args: [Router]
|
|
207
|
-
}] }, { type: undefined, decorators: [{
|
|
208
|
-
type: Inject,
|
|
209
|
-
args: [RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE]
|
|
210
|
-
}] }, { type: undefined, decorators: [{
|
|
211
|
-
type: Inject,
|
|
212
|
-
args: [RXAP_O_AUTH_REDIRECT_SIGN_IN]
|
|
213
|
-
}] }, { type: undefined, decorators: [{
|
|
214
|
-
type: Optional
|
|
215
|
-
}, {
|
|
216
|
-
type: Inject,
|
|
217
|
-
args: [RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED]
|
|
218
|
-
}] }]; } });
|
|
219
|
-
|
|
220
|
-
class OAuthSingleSignOnRoutingModule {
|
|
221
|
-
static forRouting(options = {}) {
|
|
222
|
-
const providers = [
|
|
223
|
-
OAuthSingleSignOnGuard
|
|
224
|
-
];
|
|
225
|
-
if (options.redirectContinueDisabled) {
|
|
226
|
-
providers.push({
|
|
227
|
-
provide: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED,
|
|
228
|
-
useValue: options.redirectContinueDisabled
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
return {
|
|
232
|
-
ngModule: OAuthSingleSignOnRoutingModule,
|
|
233
|
-
providers
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
237
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnRoutingModule }); }
|
|
238
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnRoutingModule, providers: [
|
|
239
|
-
OAuthSingleSignOnGuard
|
|
240
|
-
] }); }
|
|
241
|
-
}
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: OAuthSingleSignOnRoutingModule, decorators: [{
|
|
243
|
-
type: NgModule,
|
|
244
|
-
args: [{
|
|
245
|
-
exports: [],
|
|
246
|
-
providers: [
|
|
247
|
-
OAuthSingleSignOnGuard
|
|
248
|
-
]
|
|
249
|
-
}]
|
|
250
|
-
}] });
|
|
251
|
-
|
|
252
|
-
class ErrorComponent {
|
|
253
|
-
get topLevelDomain() {
|
|
254
|
-
const match = location.hostname.match(/([^.]+\.[^.]+$)/);
|
|
255
|
-
if (match) {
|
|
256
|
-
return match[0];
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
return location.hostname;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
get mainApplicationUrl() {
|
|
263
|
-
return `${location.protocol}//${this.topLevelDomain}`;
|
|
264
|
-
}
|
|
265
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
266
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: ErrorComponent, isStandalone: true, selector: "rxap-error", host: { classAttribute: "rxap-error" }, ngImport: i0, template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\" fxLayoutGap=\"8px\">\n\n <h2 i18n>Error</h2>\n <p i18n>Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n>Navigate to main application</ng-container>\n </a>\n\n </div>\n\n </div>\n\n</div>\n", styles: [".inner{padding:64px;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i1$1.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: i1$1.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: i1$1.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: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }], animations: [
|
|
267
|
-
trigger('fadeAnimation', [
|
|
268
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
269
|
-
state('in', style({ opacity: 1 })),
|
|
270
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
271
|
-
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
272
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
273
|
-
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
274
|
-
])
|
|
275
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
276
|
-
}
|
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
278
|
-
type: Component,
|
|
279
|
-
args: [{ selector: 'rxap-error', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-error' }, animations: [
|
|
280
|
-
trigger('fadeAnimation', [
|
|
281
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
282
|
-
state('in', style({ opacity: 1 })),
|
|
283
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
284
|
-
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
285
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
286
|
-
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
287
|
-
])
|
|
288
|
-
], standalone: true, imports: [FlexModule, MatButtonModule], template: "<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\" fxLayoutGap=\"8px\">\n\n <h2 i18n>Error</h2>\n <p i18n>Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n>Navigate to main application</ng-container>\n </a>\n\n </div>\n\n </div>\n\n</div>\n", styles: [".inner{padding:64px;position:relative}\n"] }]
|
|
289
|
-
}] });
|
|
290
|
-
|
|
291
|
-
const RXAP_O_AUTH_SINGLE_SIGN_ON_ROUTES = [
|
|
292
|
-
{
|
|
293
|
-
path: '',
|
|
294
|
-
component: ContainerComponent,
|
|
295
|
-
children: [
|
|
296
|
-
{
|
|
297
|
-
path: 'continue',
|
|
298
|
-
component: ContinueComponent,
|
|
299
|
-
resolve: {
|
|
300
|
-
profile: ProfileResolve
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
path: 'error',
|
|
305
|
-
component: ErrorComponent
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
path: '',
|
|
309
|
-
canActivate: [OAuthSingleSignOnGuard],
|
|
310
|
-
component: LoadingComponent
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
path: '**',
|
|
314
|
-
redirectTo: ''
|
|
315
|
-
}
|
|
316
|
-
]
|
|
317
|
-
}
|
|
318
|
-
];
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Generated bundle index. Do not edit.
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
export { ContinueComponent, DefaultRedirectContinueFactory, ErrorComponent, OAuthSingleSignOnGuard, OAuthSingleSignOnRoutingModule, OAuthSingleSignOnService, RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE, RXAP_O_AUTH_SINGLE_SIGN_ON_ROUTES, RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED };
|
|
325
|
-
//# sourceMappingURL=rxap-oauth-single-sign-on.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-oauth-single-sign-on.mjs","sources":["../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.service.ts","../../../../libs/oauth/single-sign-on/src/lib/continue/continue.component.ts","../../../../libs/oauth/single-sign-on/src/lib/continue/continue.component.html","../../../../libs/oauth/single-sign-on/src/lib/tokens.ts","../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on.guard.ts","../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on-routing.module.ts","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.ts","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.html","../../../../libs/oauth/single-sign-on/src/lib/routes.ts","../../../../libs/oauth/single-sign-on/src/rxap-oauth-single-sign-on.ts"],"sourcesContent":["import {\n OAuthService,\n OAuthMethodResponse,\n OAuthMethod,\n GetOAuthProfileMethod,\n PROFILE_AUTH_ENDPOINT,\n OAUTH_AUTH_ENDPOINT,\n OAUTH_SECRET,\n OAUTH_SSO_URL,\n RXAP_O_AUTH_REDIRECT_SIGN_OUT,\n RXAP_O_AUTH_REDIRECT_URL\n} from '@rxap/oauth';\nimport {\n Injectable,\n Inject,\n Optional\n} from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Injectable()\nexport class OAuthSingleSignOnService extends OAuthService {\n\n public payload: string | null = null;\n public redirect: string | null = null;\n\n // It is required to define the constructor with the injection\n // definition. If not defined the constructor will be created by\n // typescript without an parameters, bc the payload and redirect\n // initialization is done in the constructor.\n constructor(\n @Inject(OAuthMethod)\n oAuthMethod: OAuthMethod,\n @Inject(GetOAuthProfileMethod)\n getOAuthProfileMethod: GetOAuthProfileMethod,\n @Inject(Router)\n router: Router,\n @Optional()\n @Inject(PROFILE_AUTH_ENDPOINT)\n profileEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_AUTH_ENDPOINT)\n authEndpoint: string | null = null,\n @Optional()\n @Inject(OAUTH_SECRET)\n secret: string | null = null,\n @Optional()\n @Inject(OAUTH_SSO_URL)\n ssoUrl: string | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_OUT)\n redirectSignOut: string[] | null = null,\n @Optional()\n @Inject(RXAP_O_AUTH_REDIRECT_URL)\n redirectUrl: string | null = null\n ) {\n super(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint, authEndpoint, secret, ssoUrl, redirectSignOut, redirectUrl);\n }\n\n public async signInWithEmailAndPassword(\n email: string,\n password: string,\n remember: boolean\n ): Promise<OAuthMethodResponse> {\n const response = await super.signInWithEmailAndPassword(email, password, remember);\n this.redirectToClient();\n return response;\n }\n\n public redirectToClient() {\n window.location.replace(`${this.redirect}?accessToken=${this.accessToken}&refreshToken=${this.refreshToken}&expiresIn=${this.expiresIn}&payload=${this.payload}`);\n }\n\n public async signOut() {\n this.clearStorage();\n this.accessToken = null;\n this.refreshToken = null;\n this.expiresAt = null;\n this._isAuthenticated = false;\n }\n\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Inject,\n OnInit\n} from '@angular/core';\nimport {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\nimport {\n ActivatedRoute,\n Router\n} from '@angular/router';\nimport {\n map,\n take\n} from 'rxjs/operators';\nimport { OAuthSingleSignOnService } from '../o-auth-single-sign-on.service';\nimport {\n RXAP_O_AUTH_REDIRECT_SIGN_IN,\n OAuthService\n} from '@rxap/oauth';\nimport { MatButtonModule } from '@angular/material/button';\nimport { AvatarBackgroundImageDirective } from '@rxap/directives';\nimport {\n NgIf,\n AsyncPipe\n} from '@angular/common';\nimport { FlexModule } from '@angular/flex-layout/flex';\n\n@Component({\n selector: 'rxap-continue',\n templateUrl: './continue.component.html',\n styleUrls: [ './continue.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-continue' },\n animations: [\n trigger('fadeAnimation', [\n // the \"in\" style determines the \"resting\" state of the element when it is visible.\n state('in', style({ opacity: 1 })),\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [ style({ opacity: 0 }), animate(300) ]),\n // fade out when destroyed. this could also be written as transition('void => *')\n transition(':leave', animate(300, style({ opacity: 0 })))\n ])\n ],\n standalone: true,\n imports: [\n FlexModule,\n NgIf,\n AvatarBackgroundImageDirective,\n MatButtonModule,\n AsyncPipe\n ]\n})\nexport class ContinueComponent<\n Profile extends Record<string, any> = Record<string, any>\n> implements OnInit\n{\n public profile!: Promise<Profile>;\n\n constructor(\n @Inject(ActivatedRoute)\n private readonly route: ActivatedRoute,\n @Inject(Router)\n private readonly router: Router,\n @Inject(OAuthService)\n private readonly oAuthService: OAuthSingleSignOnService,\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[]\n ) {}\n\n public ngOnInit() {\n this.profile = this.route.data\n .pipe(\n take(1),\n map((data) => data.profile)\n )\n .toPromise();\n }\n\n signOut() {\n this.oAuthService.signOut();\n return this.router.navigate(this.redirectLogin);\n }\n\n redirect() {\n this.oAuthService.redirectToClient();\n }\n}\n","<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 <div *ngIf=\"profile | async as p\" [name]=\"p.username\" [rxapAvatarBackgroundImage]=\"p.username\"\n class=\"avatar-icon\"></div>\n\n </div>\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\">\n\n <p><span i18n>Currently Sign In as:</span> <span class=\"username\"><br>{{(profile | async)?.username}}</span></p>\n\n </div>\n\n <div fxFlex=\"nogrow\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"8px\">\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"redirect()\" color=\"primary\" i18n mat-raised-button>Continue</button>\n </div>\n\n <div fxFlex=\"nogrow\">\n <button (click)=\"signOut()\" color=\"accent\" i18n mat-stroked-button>Change Account</button>\n </div>\n\n </div>\n\n </div>\n\n</div>\n","import { InjectionToken } from '@angular/core';\n\nexport function DefaultRedirectContinueFactory(): string[] {\n return [ '/', 'continue' ];\n}\n\nexport const RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue', {\n providedIn: 'root',\n factory: DefaultRedirectContinueFactory\n});\n\nexport const RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue-disabled');\n","import { ActivatedRouteSnapshot, Router, UrlTree } from '@angular/router';\nimport {\n Inject,\n Injectable,\n Optional\n} from '@angular/core';\nimport { OAuthSingleSignOnService } from './o-auth-single-sign-on.service';\nimport {\n OAuthService,\n RXAP_O_AUTH_REDIRECT_SIGN_IN\n} from '@rxap/oauth';\nimport {\n RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE,\n RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED\n} from './tokens';\n\n@Injectable()\nexport class OAuthSingleSignOnGuard {\n\n constructor(\n @Inject(OAuthService)\n private readonly authentication: OAuthSingleSignOnService,\n @Inject(Router)\n private readonly router: Router,\n @Inject(RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE)\n private readonly redirectContinue: string[],\n @Inject(RXAP_O_AUTH_REDIRECT_SIGN_IN)\n private readonly redirectLogin: string[],\n @Optional()\n @Inject(RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED)\n private readonly redirectContinueDisabled: boolean | null\n ) {\n }\n\n public async canActivate(route: ActivatedRouteSnapshot): Promise<boolean | UrlTree> {\n\n const redirect = route.queryParamMap.get('redirect');\n const secret = route.queryParamMap.get('secret');\n const payload = route.queryParamMap.get('payload');\n const action = route.queryParamMap.get('action');\n\n if (!redirect || !secret) {\n console.warn(`The query params 'redirect' or 'secret' is not defined!`);\n return this.router.createUrlTree([ 'error' ]);\n }\n\n this.authentication.redirect = atob(redirect);\n this.authentication.payload = payload;\n this.authentication.secret = secret;\n\n if (action) {\n if (action === 'signOut') {\n await this.authentication.signOut();\n return this.router.createUrlTree(this.redirectLogin);\n }\n }\n\n const isAuthenticated = await this.authentication.isAuthenticated();\n\n console.log('isAuthenticated', isAuthenticated);\n\n if (isAuthenticated) {\n if (this.redirectContinueDisabled) {\n this.authentication.redirectToClient();\n return true;\n }\n return this.router.createUrlTree(this.redirectContinue);\n }\n\n return this.router.createUrlTree(this.redirectLogin);\n }\n\n}\n","import {\n NgModule,\n ModuleWithProviders,\n Provider\n} from '@angular/core';\n\n\nimport { RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED } from './tokens';\nimport { OAuthSingleSignOnGuard } from './o-auth-single-sign-on.guard';\n\n\nexport interface OAuthSingleSignOnOptions {\n redirectContinueDisabled?: boolean\n}\n\n@NgModule({\n exports: [],\n providers: [\n OAuthSingleSignOnGuard\n ]\n})\nexport class OAuthSingleSignOnRoutingModule {\n\n public static forRouting(options: OAuthSingleSignOnOptions = {}): ModuleWithProviders<OAuthSingleSignOnRoutingModule> {\n const providers: Provider[] = [\n OAuthSingleSignOnGuard\n ];\n if (options.redirectContinueDisabled) {\n providers.push({\n provide: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED,\n useValue: options.redirectContinueDisabled\n });\n }\n return {\n ngModule: OAuthSingleSignOnRoutingModule,\n providers\n };\n }\n\n}\n","import {\n ChangeDetectionStrategy,\n Component\n} from '@angular/core';\nimport {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\nimport { MatButtonModule } from '@angular/material/button';\nimport { FlexModule } from '@angular/flex-layout/flex';\n\n@Component({\n selector: 'rxap-error',\n templateUrl: './error.component.html',\n styleUrls: [ './error.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'rxap-error' },\n animations: [\n trigger('fadeAnimation', [\n // the \"in\" style determines the \"resting\" state of the element when it is visible.\n state('in', style({ opacity: 1 })),\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [ style({ opacity: 0 }), animate(300) ]),\n // fade out when destroyed. this could also be written as transition('void => *')\n transition(':leave', animate(300, style({ opacity: 0 })))\n ])\n ],\n standalone: true,\n imports: [ FlexModule, MatButtonModule ]\n})\nexport class ErrorComponent {\n\n public get topLevelDomain() {\n const match = location.hostname.match(/([^.]+\\.[^.]+$)/);\n if (match) {\n return match[ 0 ];\n } else {\n return location.hostname;\n }\n }\n\n public get mainApplicationUrl() {\n return `${location.protocol}//${this.topLevelDomain}`;\n }\n\n}\n","<div [@fadeAnimation]=\"'in'\" class=\"inner mat-elevation-z5\" fxLayout=\"column\" fxLayoutAlign=\"center center\"\n fxLayoutGap=\"32px\">\n\n <div class=\"content\" fxLayout=\"column\" fxLayoutGap=\"32px\">\n\n <div fxLayout=\"column\" fxLayoutGap=\"8px\">\n\n <h2 i18n>Error</h2>\n <p i18n>Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n>Navigate to main application</ng-container>\n </a>\n\n </div>\n\n </div>\n\n</div>\n","import { Routes } from '@angular/router';\nimport { ContinueComponent } from './continue/continue.component';\nimport {\n ProfileResolve,\n ContainerComponent,\n LoadingComponent\n} from '@rxap/oauth';\nimport { OAuthSingleSignOnGuard } from './o-auth-single-sign-on.guard';\nimport { ErrorComponent } from './error/error.component';\n\nexport const RXAP_O_AUTH_SINGLE_SIGN_ON_ROUTES: Routes = [\n {\n path: '',\n component: ContainerComponent,\n children: [\n {\n path: 'continue',\n component: ContinueComponent,\n resolve: {\n profile: ProfileResolve\n }\n },\n {\n path: 'error',\n component: ErrorComponent\n },\n {\n path: '',\n canActivate: [ OAuthSingleSignOnGuard ],\n component: LoadingComponent\n },\n {\n path: '**',\n redirectTo: ''\n }\n ]\n }\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAmBA,MACa,wBAAyB,SAAQ,YAAY,CAAA;;;;;IASxD,WAEI,CAAA,WAAwB,EAExB,qBAA4C,EAE5C,MAAc,EAGd,eAAA,GAAiC,IAAI,EAGrC,YAAmC,GAAA,IAAI,EAGvC,MAAmC,GAAA,IAAI,EAGvC,MAAmC,GAAA,IAAI,EAGvC,eAAmC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,OAAO,CAAC,GAAG,CAAC,CAAE,CAAC;;AAE7D,4BAAA,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;yBAC1D,CAAC;AACH,qBAAA,EAAA,UAAA,EACgB,IAAI,EACJ,OAAA,EAAA,CAAE,UAAU,EAAE,eAAe,CAAE,EAAA,QAAA,EAAA,2iBAAA,EAAA,MAAA,EAAA,CAAA,0CAAA,CAAA,EAAA,CAAA;;;AErBrC,MAAA,iCAAiC,GAAW;AACvD,IAAA;AACE,QAAA,IAAI,EAAO,EAAE;AACb,QAAA,SAAS,EAAE,kBAAkB;AAC7B,QAAA,QAAQ,EAAG;AACT,YAAA;AACE,gBAAA,IAAI,EAAO,UAAU;AACrB,gBAAA,SAAS,EAAE,iBAAiB;AAC5B,gBAAA,OAAO,EAAI;AACT,oBAAA,OAAO,EAAE,cAAc;AACxB,iBAAA;AACF,aAAA;AACD,YAAA;AACE,gBAAA,IAAI,EAAO,OAAO;AAClB,gBAAA,SAAS,EAAE,cAAc;AAC1B,aAAA;AACD,YAAA;AACE,gBAAA,IAAI,EAAS,EAAE;gBACf,WAAW,EAAE,CAAE,sBAAsB,CAAE;AACvC,gBAAA,SAAS,EAAI,gBAAgB;AAC9B,aAAA;AACD,YAAA;AACE,gBAAA,IAAI,EAAQ,IAAI;AAChB,gBAAA,UAAU,EAAE,EAAE;AACf,aAAA;AACF,SAAA;AACF,KAAA;;;ACpCH;;AAEG;;;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RouterOutlet } from '@angular/router';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class ContainerComponent {
|
|
4
|
-
prepareRoute(outlet: RouterOutlet): "true" | import("@angular/router").ActivatedRoute;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ContainerComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContainerComponent, "rxap-container", never, {}, {}, never, never, true, never>;
|
|
7
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { Method } from '@rxap/utilities/rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare const PROFILE_AUTH_ENDPOINT: InjectionToken<unknown>;
|
|
6
|
-
export interface GetOAuthProfileMethodParameters {
|
|
7
|
-
accessToken: string;
|
|
8
|
-
profileEndpoint?: string | null;
|
|
9
|
-
withCredentials?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare class GetOAuthProfileMethod<T = any> implements Method<T, GetOAuthProfileMethodParameters> {
|
|
12
|
-
private readonly http;
|
|
13
|
-
profileEndpoint: string | null;
|
|
14
|
-
constructor(http: HttpClient, profileEndpoint?: string | null);
|
|
15
|
-
call(parameters: GetOAuthProfileMethodParameters): Promise<T>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GetOAuthProfileMethod<any>, [null, { optional: true; }]>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<GetOAuthProfileMethod<any>>;
|
|
18
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, UrlTree, Router } from '@angular/router';
|
|
2
|
-
import { OAuthService } from './o-auth.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OAuthExtractGuard {
|
|
5
|
-
private readonly router;
|
|
6
|
-
private readonly oAuthService;
|
|
7
|
-
constructor(router: Router, oAuthService: OAuthService);
|
|
8
|
-
canActivate(route: ActivatedRouteSnapshot): UrlTree;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthExtractGuard, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthExtractGuard>;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
|
|
2
|
-
import { OAuthService } from './o-auth.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OAuthRedirectGuard {
|
|
5
|
-
private readonly oAuthService;
|
|
6
|
-
constructor(oAuthService: OAuthService);
|
|
7
|
-
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree>;
|
|
8
|
-
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthRedirectGuard, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthRedirectGuard>;
|
|
11
|
-
}
|
package/lib/o-auth.method.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Method } from '@rxap/utilities/rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export interface OAuthMethodWithUsernamePasswordParameters {
|
|
5
|
-
grantType?: string;
|
|
6
|
-
username: string;
|
|
7
|
-
password: string;
|
|
8
|
-
secret: string;
|
|
9
|
-
clientId?: string;
|
|
10
|
-
authEndpoint: string;
|
|
11
|
-
}
|
|
12
|
-
export interface OAuthMethodWithRefreshTokenParameters {
|
|
13
|
-
grantType?: string;
|
|
14
|
-
refreshToken: string;
|
|
15
|
-
secret: string;
|
|
16
|
-
clientId?: string;
|
|
17
|
-
authEndpoint: string;
|
|
18
|
-
}
|
|
19
|
-
export type OAuthMethodParameters = (OAuthMethodWithUsernamePasswordParameters | OAuthMethodWithRefreshTokenParameters) & {
|
|
20
|
-
withCredentials?: boolean;
|
|
21
|
-
};
|
|
22
|
-
export declare function IsOAuthMethodWithRefreshTokenParameters(parameters: OAuthMethodParameters): parameters is OAuthMethodWithRefreshTokenParameters;
|
|
23
|
-
export declare function IsOAuthMethodWithUsernamePasswordParameters(parameters: OAuthMethodParameters): parameters is OAuthMethodWithUsernamePasswordParameters;
|
|
24
|
-
export declare function AssertOAuthMethodWithUsernamePasswordParameters(parameters: OAuthMethodParameters): asserts parameters is OAuthMethodWithUsernamePasswordParameters;
|
|
25
|
-
export declare function AssertOAuthMethodWithRefreshTokenParameters(parameters: OAuthMethodParameters): asserts parameters is OAuthMethodWithRefreshTokenParameters;
|
|
26
|
-
export declare function AssertOAuthMethodParameters(parameters: any): asserts parameters is OAuthMethodParameters;
|
|
27
|
-
export interface OAuthResponse {
|
|
28
|
-
access_token: string;
|
|
29
|
-
refresh_token: string;
|
|
30
|
-
expires_in: number;
|
|
31
|
-
}
|
|
32
|
-
export interface OAuthMethodResponse {
|
|
33
|
-
accessToken: string;
|
|
34
|
-
refreshToken: string;
|
|
35
|
-
expiresIn: number;
|
|
36
|
-
expiresAt: Date;
|
|
37
|
-
}
|
|
38
|
-
export declare class OAuthMethod implements Method<OAuthMethodResponse, OAuthMethodParameters> {
|
|
39
|
-
private readonly http;
|
|
40
|
-
constructor(http: HttpClient);
|
|
41
|
-
call(parameters: OAuthMethodParameters): Promise<OAuthMethodResponse>;
|
|
42
|
-
private getGrantType;
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthMethod, never>;
|
|
44
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthMethod>;
|
|
45
|
-
}
|
package/lib/o-auth.module.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export interface OAuthModuleOptions {
|
|
4
|
-
signInPath?: string[];
|
|
5
|
-
signOutPath?: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare class OAuthModule {
|
|
8
|
-
static forRoot(options?: OAuthModuleOptions): ModuleWithProviders<OAuthModule>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<OAuthModule, never, never, never>;
|
|
11
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<OAuthModule>;
|
|
12
|
-
}
|
package/lib/o-auth.service.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { GetOAuthProfileMethod } from './get-o-auth-profile.method';
|
|
3
|
-
import { OAuthMethod, OAuthMethodResponse } from './o-auth.method';
|
|
4
|
-
import { Router } from '@angular/router';
|
|
5
|
-
import { ReplaySubject } from 'rxjs';
|
|
6
|
-
import { AuthenticationEvent } from '@rxap/authentication';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare const OAUTH_SECRET: InjectionToken<unknown>;
|
|
9
|
-
export declare const OAUTH_AUTH_ENDPOINT: InjectionToken<unknown>;
|
|
10
|
-
export declare const OAUTH_SSO_URL: InjectionToken<unknown>;
|
|
11
|
-
export declare const OAUTH_CLIENT_ID: InjectionToken<unknown>;
|
|
12
|
-
export declare const ACCESS_TOKEN_LOCAL_STORAGE_KEY = "access_token";
|
|
13
|
-
export declare const REFRESH_TOKEN_LOCAL_STORAGE_KEY = "refresh_token";
|
|
14
|
-
export declare const EXPIRES_AT_LOCAL_STORAGE_KEY = "expires_at";
|
|
15
|
-
export declare const REMEMBER_LOCAL_STORAGE_KEY = "remember";
|
|
16
|
-
export interface OAuthStatus {
|
|
17
|
-
accessToken: string;
|
|
18
|
-
refreshToken?: string | null;
|
|
19
|
-
expiresIn: number;
|
|
20
|
-
expiresAt: Date;
|
|
21
|
-
}
|
|
22
|
-
export declare class OAuthService<Profile = any> {
|
|
23
|
-
readonly oAuthMethod: OAuthMethod;
|
|
24
|
-
readonly getOAuthProfileMethod: GetOAuthProfileMethod;
|
|
25
|
-
private readonly router;
|
|
26
|
-
profileEndpoint: string | null;
|
|
27
|
-
authEndpoint: string | null;
|
|
28
|
-
secret: string | null;
|
|
29
|
-
private readonly ssoUrl;
|
|
30
|
-
private readonly redirectSignOut;
|
|
31
|
-
private readonly redirectUrl;
|
|
32
|
-
clientId: string | null;
|
|
33
|
-
readonly events$: ReplaySubject<AuthenticationEvent>;
|
|
34
|
-
get expiresAt(): Date | null;
|
|
35
|
-
set expiresAt(value: Date | null);
|
|
36
|
-
get refreshToken(): string | null;
|
|
37
|
-
set refreshToken(value: string | null);
|
|
38
|
-
get accessToken(): string | null;
|
|
39
|
-
set accessToken(value: string | null);
|
|
40
|
-
/**
|
|
41
|
-
* The time until the access token expires in seconds
|
|
42
|
-
*/
|
|
43
|
-
get expiresIn(): number | null;
|
|
44
|
-
get remember(): boolean;
|
|
45
|
-
set remember(value: boolean);
|
|
46
|
-
private _profile?;
|
|
47
|
-
protected _isAuthenticated: boolean | null;
|
|
48
|
-
get profile(): Profile | null | undefined;
|
|
49
|
-
constructor(oAuthMethod: OAuthMethod, getOAuthProfileMethod: GetOAuthProfileMethod, router: Router, profileEndpoint?: string | null, authEndpoint?: string | null, secret?: string | null, ssoUrl?: string | null, redirectSignOut?: string[] | null, redirectUrl?: string | null, clientId?: string | null);
|
|
50
|
-
signInWithRedirect(lastUrl?: string): void;
|
|
51
|
-
isAuthenticated(): Promise<boolean>;
|
|
52
|
-
signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<OAuthMethodResponse>;
|
|
53
|
-
getProfile<T extends Profile = Profile>(): Promise<T | null>;
|
|
54
|
-
signOut(): Promise<void>;
|
|
55
|
-
authenticated(response: OAuthStatus, remember?: boolean): void;
|
|
56
|
-
private getKey;
|
|
57
|
-
private getItem;
|
|
58
|
-
private setItem;
|
|
59
|
-
private removeItem;
|
|
60
|
-
protected clearStorage(): void;
|
|
61
|
-
private signInWithRefreshToken;
|
|
62
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthService<any>, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
63
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthService<any>>;
|
|
64
|
-
}
|
package/lib/profile.resolve.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { OAuthService } from './o-auth.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ProfileResolve<T = Record<string, any>> {
|
|
5
|
-
private readonly oAuthService;
|
|
6
|
-
private readonly router;
|
|
7
|
-
private readonly redirectLogin;
|
|
8
|
-
constructor(oAuthService: OAuthService, router: Router, redirectLogin: string[]);
|
|
9
|
-
resolve(): Promise<T>;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ProfileResolve<any>, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ProfileResolve<any>>;
|
|
12
|
-
}
|
package/lib/routes.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OAuthService } from '../o-auth.service';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SignInWithRedirectComponent {
|
|
4
|
-
private readonly authService;
|
|
5
|
-
constructor(authService: OAuthService);
|
|
6
|
-
signIn(): void;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SignInWithRedirectComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SignInWithRedirectComponent, "rxap-sign-in-with-redirect", never, {}, {}, never, never, true, never>;
|
|
9
|
-
}
|
package/lib/tokens.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export declare function DefaultRedirectSignInFactory(): string[];
|
|
3
|
-
export declare const RXAP_O_AUTH_REDIRECT_SIGN_IN: InjectionToken<string[]>;
|
|
4
|
-
export declare const RXAP_O_AUTH_REDIRECT_SIGN_OUT: InjectionToken<unknown>;
|
|
5
|
-
export declare function DefaultRedirectUrl(): string;
|
|
6
|
-
export declare const RXAP_O_AUTH_REDIRECT_URL: InjectionToken<string>;
|