@rxap/oauth 13.0.0 → 14.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/container/container.component.mjs +4 -4
- package/esm2020/lib/container/container.component.module.mjs +5 -7
- package/esm2020/lib/get-o-auth-profile.method.mjs +3 -3
- package/esm2020/lib/loading/loading.component.mjs +4 -4
- package/esm2020/lib/loading/loading.component.module.mjs +5 -7
- package/esm2020/lib/o-auth-extract.guard.mjs +3 -3
- package/esm2020/lib/o-auth-redirect.guard.mjs +3 -3
- package/esm2020/lib/o-auth-routing.module.mjs +4 -4
- package/esm2020/lib/o-auth.method.mjs +3 -3
- package/esm2020/lib/o-auth.module.mjs +4 -4
- package/esm2020/lib/o-auth.service.mjs +3 -3
- package/esm2020/lib/profile.resolve.mjs +3 -3
- package/esm2020/lib/sign-in-with-redirect/sign-in-with-redirect.component.mjs +7 -7
- package/esm2020/lib/sign-in-with-redirect/sign-in-with-redirect.component.module.mjs +9 -11
- package/fesm2015/rxap-oauth.mjs +56 -62
- package/fesm2015/rxap-oauth.mjs.map +1 -1
- package/fesm2020/rxap-oauth.mjs +56 -62
- package/fesm2020/rxap-oauth.mjs.map +1 -1
- package/lib/container/container.component.d.ts +1 -1
- package/lib/loading/loading.component.d.ts +1 -1
- package/lib/sign-in-with-redirect/sign-in-with-redirect.component.d.ts +1 -1
- package/package.json +25 -36
- package/esm2020/single-sign-on/lib/continue/continue.component.mjs +0 -70
- package/esm2020/single-sign-on/lib/continue/continue.component.module.mjs +0 -42
- package/esm2020/single-sign-on/lib/error/error.component.mjs +0 -44
- package/esm2020/single-sign-on/lib/error/error.component.module.mjs +0 -30
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on-routing.module.mjs +0 -50
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on.guard.mjs +0 -69
- package/esm2020/single-sign-on/lib/o-auth-single-sign-on.service.mjs +0 -77
- package/esm2020/single-sign-on/lib/routes.mjs +0 -33
- package/esm2020/single-sign-on/lib/tokens.mjs +0 -10
- package/esm2020/single-sign-on/public_api.mjs +0 -10
- package/esm2020/single-sign-on/rxap-oauth-single-sign-on.mjs +0 -5
- package/fesm2015/rxap-oauth-single-sign-on.mjs +0 -408
- package/fesm2015/rxap-oauth-single-sign-on.mjs.map +0 -1
- package/fesm2020/rxap-oauth-single-sign-on.mjs +0 -392
- package/fesm2020/rxap-oauth-single-sign-on.mjs.map +0 -1
- package/rxap-oauth.d.ts +0 -5
- package/single-sign-on/lib/continue/continue.component.d.ts +0 -17
- package/single-sign-on/lib/continue/continue.component.module.d.ts +0 -12
- package/single-sign-on/lib/error/error.component.d.ts +0 -7
- package/single-sign-on/lib/error/error.component.module.d.ts +0 -9
- package/single-sign-on/lib/o-auth-single-sign-on-routing.module.d.ts +0 -14
- 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/package.json +0 -10
- package/single-sign-on/public_api.d.ts +0 -9
- package/single-sign-on/rxap-oauth-single-sign-on.d.ts +0 -5
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Inject, Optional, Component, ChangeDetectionStrategy, NgModule, InjectionToken } from '@angular/core';
|
|
3
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
4
|
-
import * as i5 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, LoadingComponentModule, ContainerComponentModule, ContainerComponent, ProfileResolve, LoadingComponent } from '@rxap/oauth';
|
|
9
|
-
import * as i1$1 from '@angular/material/button';
|
|
10
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
-
import * as i2 from '@angular/flex-layout/flex';
|
|
12
|
-
import * as i3 from '@angular/common';
|
|
13
|
-
import { CommonModule } from '@angular/common';
|
|
14
|
-
import * as i4 from '@rxap/directives';
|
|
15
|
-
import { AvatarBackgroundImageDirectiveModule } from '@rxap/directives';
|
|
16
|
-
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
17
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
18
|
-
|
|
19
|
-
class OAuthSingleSignOnService extends OAuthService {
|
|
20
|
-
// It is required to define the constructor with the injection
|
|
21
|
-
// definition. If not defined the constructor will be created by
|
|
22
|
-
// typescript without an parameters, bc the payload and redirect
|
|
23
|
-
// initialization is done in the constructor.
|
|
24
|
-
constructor(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint = null, authEndpoint = null, secret = null, ssoUrl = null, redirectSignOut = null, redirectUrl = null) {
|
|
25
|
-
super(oAuthMethod, getOAuthProfileMethod, router, profileEndpoint, authEndpoint, secret, ssoUrl, redirectSignOut, redirectUrl);
|
|
26
|
-
this.payload = null;
|
|
27
|
-
this.redirect = null;
|
|
28
|
-
}
|
|
29
|
-
async signInWithEmailAndPassword(email, password, remember) {
|
|
30
|
-
const response = await super.signInWithEmailAndPassword(email, password, remember);
|
|
31
|
-
this.redirectToClient();
|
|
32
|
-
return response;
|
|
33
|
-
}
|
|
34
|
-
redirectToClient() {
|
|
35
|
-
window.location.replace(`${this.redirect}?accessToken=${this.accessToken}&refreshToken=${this.refreshToken}&expiresIn=${this.expiresIn}&payload=${this.payload}`);
|
|
36
|
-
}
|
|
37
|
-
async signOut() {
|
|
38
|
-
this.clearStorage();
|
|
39
|
-
this.accessToken = null;
|
|
40
|
-
this.refreshToken = null;
|
|
41
|
-
this.expiresAt = null;
|
|
42
|
-
this._isAuthenticated = false;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
OAuthSingleSignOnService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", 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 });
|
|
46
|
-
OAuthSingleSignOnService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnService });
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnService, decorators: [{
|
|
48
|
-
type: Injectable
|
|
49
|
-
}], ctorParameters: function () { return [{ type: i1.OAuthMethod, decorators: [{
|
|
50
|
-
type: Inject,
|
|
51
|
-
args: [OAuthMethod]
|
|
52
|
-
}] }, { type: i1.GetOAuthProfileMethod, decorators: [{
|
|
53
|
-
type: Inject,
|
|
54
|
-
args: [GetOAuthProfileMethod]
|
|
55
|
-
}] }, { type: i5.Router, decorators: [{
|
|
56
|
-
type: Inject,
|
|
57
|
-
args: [Router]
|
|
58
|
-
}] }, { type: undefined, decorators: [{
|
|
59
|
-
type: Optional
|
|
60
|
-
}, {
|
|
61
|
-
type: Inject,
|
|
62
|
-
args: [PROFILE_AUTH_ENDPOINT]
|
|
63
|
-
}] }, { type: undefined, decorators: [{
|
|
64
|
-
type: Optional
|
|
65
|
-
}, {
|
|
66
|
-
type: Inject,
|
|
67
|
-
args: [OAUTH_AUTH_ENDPOINT]
|
|
68
|
-
}] }, { type: undefined, decorators: [{
|
|
69
|
-
type: Optional
|
|
70
|
-
}, {
|
|
71
|
-
type: Inject,
|
|
72
|
-
args: [OAUTH_SECRET]
|
|
73
|
-
}] }, { type: undefined, decorators: [{
|
|
74
|
-
type: Optional
|
|
75
|
-
}, {
|
|
76
|
-
type: Inject,
|
|
77
|
-
args: [OAUTH_SSO_URL]
|
|
78
|
-
}] }, { type: undefined, decorators: [{
|
|
79
|
-
type: Optional
|
|
80
|
-
}, {
|
|
81
|
-
type: Inject,
|
|
82
|
-
args: [RXAP_O_AUTH_REDIRECT_SIGN_OUT]
|
|
83
|
-
}] }, { type: undefined, decorators: [{
|
|
84
|
-
type: Optional
|
|
85
|
-
}, {
|
|
86
|
-
type: Inject,
|
|
87
|
-
args: [RXAP_O_AUTH_REDIRECT_URL]
|
|
88
|
-
}] }]; } });
|
|
89
|
-
|
|
90
|
-
class ContinueComponent {
|
|
91
|
-
constructor(route, router, oAuthService, redirectLogin) {
|
|
92
|
-
this.route = route;
|
|
93
|
-
this.router = router;
|
|
94
|
-
this.oAuthService = oAuthService;
|
|
95
|
-
this.redirectLogin = redirectLogin;
|
|
96
|
-
}
|
|
97
|
-
ngOnInit() {
|
|
98
|
-
this.profile = this.route.data
|
|
99
|
-
.pipe(take(1), map((data) => data.profile))
|
|
100
|
-
.toPromise();
|
|
101
|
-
}
|
|
102
|
-
signOut() {
|
|
103
|
-
this.oAuthService.signOut();
|
|
104
|
-
return this.router.navigate(this.redirectLogin);
|
|
105
|
-
}
|
|
106
|
-
redirect() {
|
|
107
|
-
this.oAuthService.redirectToClient();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
ContinueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponent, deps: [{ token: ActivatedRoute }, { token: Router }, { token: OAuthService }, { token: RXAP_O_AUTH_REDIRECT_SIGN_IN }], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
-
ContinueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ContinueComponent, 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;bottom:0;left:0;right:0;top:auto}\n"], components: [{ type: i1$1.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: 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"] }, { 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"] }, { 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"] }, { 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"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.AvatarBackgroundImageDirective, selector: "[rxapAvatarBackgroundImage]", inputs: ["name", "rxapAvatarBackgroundImage"] }], pipes: { "async": i3.AsyncPipe }, animations: [
|
|
112
|
-
trigger('fadeAnimation', [
|
|
113
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
114
|
-
state('in', style({ opacity: 1 })),
|
|
115
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
116
|
-
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
117
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
118
|
-
transition(':leave', animate(300, style({ opacity: 0 }))),
|
|
119
|
-
]),
|
|
120
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponent, decorators: [{
|
|
122
|
-
type: Component,
|
|
123
|
-
args: [{ selector: 'rxap-continue', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-continue' }, animations: [
|
|
124
|
-
trigger('fadeAnimation', [
|
|
125
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
126
|
-
state('in', style({ opacity: 1 })),
|
|
127
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
128
|
-
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
129
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
130
|
-
transition(':leave', animate(300, style({ opacity: 0 }))),
|
|
131
|
-
]),
|
|
132
|
-
], 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;bottom:0;left:0;right:0;top:auto}\n"] }]
|
|
133
|
-
}], ctorParameters: function () { return [{ type: i5.ActivatedRoute, decorators: [{
|
|
134
|
-
type: Inject,
|
|
135
|
-
args: [ActivatedRoute]
|
|
136
|
-
}] }, { type: i5.Router, decorators: [{
|
|
137
|
-
type: Inject,
|
|
138
|
-
args: [Router]
|
|
139
|
-
}] }, { type: OAuthSingleSignOnService, decorators: [{
|
|
140
|
-
type: Inject,
|
|
141
|
-
args: [OAuthService]
|
|
142
|
-
}] }, { type: undefined, decorators: [{
|
|
143
|
-
type: Inject,
|
|
144
|
-
args: [RXAP_O_AUTH_REDIRECT_SIGN_IN]
|
|
145
|
-
}] }]; } });
|
|
146
|
-
|
|
147
|
-
class ContinueComponentModule {
|
|
148
|
-
}
|
|
149
|
-
ContinueComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
150
|
-
ContinueComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponentModule, declarations: [ContinueComponent], imports: [FlexLayoutModule,
|
|
151
|
-
MatIconModule,
|
|
152
|
-
MatButtonModule,
|
|
153
|
-
CommonModule,
|
|
154
|
-
AvatarBackgroundImageDirectiveModule], exports: [ContinueComponent] });
|
|
155
|
-
ContinueComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponentModule, imports: [[
|
|
156
|
-
FlexLayoutModule,
|
|
157
|
-
MatIconModule,
|
|
158
|
-
MatButtonModule,
|
|
159
|
-
CommonModule,
|
|
160
|
-
AvatarBackgroundImageDirectiveModule
|
|
161
|
-
]] });
|
|
162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ContinueComponentModule, decorators: [{
|
|
163
|
-
type: NgModule,
|
|
164
|
-
args: [{
|
|
165
|
-
declarations: [
|
|
166
|
-
ContinueComponent
|
|
167
|
-
],
|
|
168
|
-
imports: [
|
|
169
|
-
FlexLayoutModule,
|
|
170
|
-
MatIconModule,
|
|
171
|
-
MatButtonModule,
|
|
172
|
-
CommonModule,
|
|
173
|
-
AvatarBackgroundImageDirectiveModule
|
|
174
|
-
],
|
|
175
|
-
exports: [
|
|
176
|
-
ContinueComponent
|
|
177
|
-
]
|
|
178
|
-
}]
|
|
179
|
-
}] });
|
|
180
|
-
|
|
181
|
-
function DefaultRedirectContinueFactory() {
|
|
182
|
-
return ['/', 'continue'];
|
|
183
|
-
}
|
|
184
|
-
const RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue', {
|
|
185
|
-
providedIn: 'root',
|
|
186
|
-
factory: DefaultRedirectContinueFactory
|
|
187
|
-
});
|
|
188
|
-
const RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED = new InjectionToken('rxap/o-auth/single-sign-on/redirect-continue-disabled');
|
|
189
|
-
|
|
190
|
-
class OAuthSingleSignOnGuard {
|
|
191
|
-
constructor(authentication, router, redirectContinue, redirectLogin, redirectContinueDisabled) {
|
|
192
|
-
this.authentication = authentication;
|
|
193
|
-
this.router = router;
|
|
194
|
-
this.redirectContinue = redirectContinue;
|
|
195
|
-
this.redirectLogin = redirectLogin;
|
|
196
|
-
this.redirectContinueDisabled = redirectContinueDisabled;
|
|
197
|
-
}
|
|
198
|
-
async canActivate(route) {
|
|
199
|
-
const redirect = route.queryParamMap.get('redirect');
|
|
200
|
-
const secret = route.queryParamMap.get('secret');
|
|
201
|
-
const payload = route.queryParamMap.get('payload');
|
|
202
|
-
const action = route.queryParamMap.get('action');
|
|
203
|
-
if (!redirect || !secret) {
|
|
204
|
-
console.warn(`The query params 'redirect' or 'secret' is not defined!`);
|
|
205
|
-
return this.router.createUrlTree(['error']);
|
|
206
|
-
}
|
|
207
|
-
this.authentication.redirect = atob(redirect);
|
|
208
|
-
this.authentication.payload = payload;
|
|
209
|
-
this.authentication.secret = secret;
|
|
210
|
-
if (action) {
|
|
211
|
-
if (action === 'signOut') {
|
|
212
|
-
await this.authentication.signOut();
|
|
213
|
-
return this.router.createUrlTree(this.redirectLogin);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
const isAuthenticated = await this.authentication.isAuthenticated();
|
|
217
|
-
console.log('isAuthenticated', isAuthenticated);
|
|
218
|
-
if (isAuthenticated) {
|
|
219
|
-
if (this.redirectContinueDisabled) {
|
|
220
|
-
this.authentication.redirectToClient();
|
|
221
|
-
return true;
|
|
222
|
-
}
|
|
223
|
-
return this.router.createUrlTree(this.redirectContinue);
|
|
224
|
-
}
|
|
225
|
-
return this.router.createUrlTree(this.redirectLogin);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
OAuthSingleSignOnGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", 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 });
|
|
229
|
-
OAuthSingleSignOnGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnGuard });
|
|
230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnGuard, decorators: [{
|
|
231
|
-
type: Injectable
|
|
232
|
-
}], ctorParameters: function () { return [{ type: OAuthSingleSignOnService, decorators: [{
|
|
233
|
-
type: Inject,
|
|
234
|
-
args: [OAuthService]
|
|
235
|
-
}] }, { type: i5.Router, decorators: [{
|
|
236
|
-
type: Inject,
|
|
237
|
-
args: [Router]
|
|
238
|
-
}] }, { type: undefined, decorators: [{
|
|
239
|
-
type: Inject,
|
|
240
|
-
args: [RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE]
|
|
241
|
-
}] }, { type: undefined, decorators: [{
|
|
242
|
-
type: Inject,
|
|
243
|
-
args: [RXAP_O_AUTH_REDIRECT_SIGN_IN]
|
|
244
|
-
}] }, { type: undefined, decorators: [{
|
|
245
|
-
type: Optional
|
|
246
|
-
}, {
|
|
247
|
-
type: Inject,
|
|
248
|
-
args: [RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED]
|
|
249
|
-
}] }]; } });
|
|
250
|
-
|
|
251
|
-
class ErrorComponent {
|
|
252
|
-
get topLevelDomain() {
|
|
253
|
-
const match = location.hostname.match(/([^.]+\.[^.]+$)/);
|
|
254
|
-
if (match) {
|
|
255
|
-
return match[0];
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
return location.hostname;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
get mainApplicationUrl() {
|
|
262
|
-
return `${location.protocol}//${this.topLevelDomain}`;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
266
|
-
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ErrorComponent, 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=\"@@rxap-oauth.single-sign-on.error.title\">Error</h2>\n <p i18n=\"@@rxap-oauth.single-sign-on.error.message\">Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n=\"@@rxap-oauth.single-sign-on.error.action\">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"], components: [{ type: i1$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }], directives: [{ 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"] }, { 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"] }, { 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"] }], 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
277
|
-
type: Component,
|
|
278
|
-
args: [{ selector: 'rxap-error', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-error' }, animations: [
|
|
279
|
-
trigger('fadeAnimation', [
|
|
280
|
-
// the "in" style determines the "resting" state of the element when it is visible.
|
|
281
|
-
state('in', style({ opacity: 1 })),
|
|
282
|
-
// fade in when created. this could also be written as transition('void => *')
|
|
283
|
-
transition(':enter', [style({ opacity: 0 }), animate(300)]),
|
|
284
|
-
// fade out when destroyed. this could also be written as transition('void => *')
|
|
285
|
-
transition(':leave', animate(300, style({ opacity: 0 })))
|
|
286
|
-
])
|
|
287
|
-
], 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=\"@@rxap-oauth.single-sign-on.error.title\">Error</h2>\n <p i18n=\"@@rxap-oauth.single-sign-on.error.message\">Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n=\"@@rxap-oauth.single-sign-on.error.action\">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"] }]
|
|
288
|
-
}] });
|
|
289
|
-
|
|
290
|
-
class ErrorComponentModule {
|
|
291
|
-
}
|
|
292
|
-
ErrorComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
293
|
-
ErrorComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponentModule, declarations: [ErrorComponent], imports: [FlexLayoutModule,
|
|
294
|
-
MatButtonModule], exports: [ErrorComponent] });
|
|
295
|
-
ErrorComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponentModule, imports: [[
|
|
296
|
-
FlexLayoutModule,
|
|
297
|
-
MatButtonModule
|
|
298
|
-
]] });
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorComponentModule, decorators: [{
|
|
300
|
-
type: NgModule,
|
|
301
|
-
args: [{
|
|
302
|
-
declarations: [
|
|
303
|
-
ErrorComponent
|
|
304
|
-
],
|
|
305
|
-
imports: [
|
|
306
|
-
FlexLayoutModule,
|
|
307
|
-
MatButtonModule
|
|
308
|
-
],
|
|
309
|
-
exports: [
|
|
310
|
-
ErrorComponent
|
|
311
|
-
]
|
|
312
|
-
}]
|
|
313
|
-
}] });
|
|
314
|
-
|
|
315
|
-
class OAuthSingleSignOnRoutingModule {
|
|
316
|
-
static forRouting(options = {}) {
|
|
317
|
-
const providers = [
|
|
318
|
-
OAuthSingleSignOnGuard
|
|
319
|
-
];
|
|
320
|
-
if (options.redirectContinueDisabled) {
|
|
321
|
-
providers.push({
|
|
322
|
-
provide: RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED,
|
|
323
|
-
useValue: options.redirectContinueDisabled
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
return {
|
|
327
|
-
ngModule: OAuthSingleSignOnRoutingModule,
|
|
328
|
-
providers
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
OAuthSingleSignOnRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
333
|
-
OAuthSingleSignOnRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnRoutingModule, exports: [ContinueComponentModule,
|
|
334
|
-
LoadingComponentModule,
|
|
335
|
-
ContainerComponentModule,
|
|
336
|
-
ErrorComponentModule] });
|
|
337
|
-
OAuthSingleSignOnRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnRoutingModule, providers: [
|
|
338
|
-
OAuthSingleSignOnGuard
|
|
339
|
-
], imports: [ContinueComponentModule,
|
|
340
|
-
LoadingComponentModule,
|
|
341
|
-
ContainerComponentModule,
|
|
342
|
-
ErrorComponentModule] });
|
|
343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: OAuthSingleSignOnRoutingModule, decorators: [{
|
|
344
|
-
type: NgModule,
|
|
345
|
-
args: [{
|
|
346
|
-
exports: [
|
|
347
|
-
ContinueComponentModule,
|
|
348
|
-
LoadingComponentModule,
|
|
349
|
-
ContainerComponentModule,
|
|
350
|
-
ErrorComponentModule
|
|
351
|
-
],
|
|
352
|
-
providers: [
|
|
353
|
-
OAuthSingleSignOnGuard
|
|
354
|
-
]
|
|
355
|
-
}]
|
|
356
|
-
}] });
|
|
357
|
-
|
|
358
|
-
const RXAP_O_AUTH_SINGLE_SIGN_ON_ROUTES = [
|
|
359
|
-
{
|
|
360
|
-
path: '',
|
|
361
|
-
component: ContainerComponent,
|
|
362
|
-
children: [
|
|
363
|
-
{
|
|
364
|
-
path: 'continue',
|
|
365
|
-
component: ContinueComponent,
|
|
366
|
-
resolve: {
|
|
367
|
-
profile: ProfileResolve
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
path: 'error',
|
|
372
|
-
component: ErrorComponent
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
path: '',
|
|
376
|
-
canActivate: [OAuthSingleSignOnGuard],
|
|
377
|
-
component: LoadingComponent
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
path: '**',
|
|
381
|
-
redirectTo: ''
|
|
382
|
-
}
|
|
383
|
-
]
|
|
384
|
-
}
|
|
385
|
-
];
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* Generated bundle index. Do not edit.
|
|
389
|
-
*/
|
|
390
|
-
|
|
391
|
-
export { ContinueComponent, ContinueComponentModule, DefaultRedirectContinueFactory, ErrorComponent, ErrorComponentModule, 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 };
|
|
392
|
-
//# 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/continue/continue.component.module.ts","../../../../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/error/error.component.ts","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.html","../../../../libs/oauth/single-sign-on/src/lib/error/error.component.module.ts","../../../../libs/oauth/single-sign-on/src/lib/o-auth-single-sign-on-routing.module.ts","../../../../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';\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\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [style({ opacity: 0 }), animate(300)]),\n\n // fade out when destroyed. this could also be written as transition('void => *')\n transition(':leave', animate(300, style({ opacity: 0 }))),\n ]),\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 { NgModule } from '@angular/core';\nimport { ContinueComponent } from './continue.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { CommonModule } from '@angular/common';\nimport { AvatarBackgroundImageDirectiveModule } from '@rxap/directives';\n\n\n@NgModule({\n declarations: [\n ContinueComponent\n ],\n imports: [\n FlexLayoutModule,\n MatIconModule,\n MatButtonModule,\n CommonModule,\n AvatarBackgroundImageDirectiveModule\n ],\n exports: [\n ContinueComponent\n ]\n})\nexport class ContinueComponentModule {\n}\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 {\n ActivatedRouteSnapshot,\n CanActivate,\n Router,\n UrlTree\n} 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 implements CanActivate {\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 ChangeDetectionStrategy,\n Component\n} from '@angular/core';\nimport {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\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\n // fade in when created. this could also be written as transition('void => *')\n transition(':enter', [ style({ opacity: 0 }), animate(300) ]),\n\n // fade out when destroyed. this could also be written as transition('void => *')\n transition(':leave', animate(300, style({ opacity: 0 })))\n ])\n ]\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=\"@@rxap-oauth.single-sign-on.error.title\">Error</h2>\n <p i18n=\"@@rxap-oauth.single-sign-on.error.message\">Please open the main application again.</p>\n <a [href]=\"mainApplicationUrl\" color=\"primary\" mat-raised-button>\n <ng-container i18n=\"@@rxap-oauth.single-sign-on.error.action\">Navigate to main application</ng-container>\n </a>\n\n </div>\n\n </div>\n\n</div>\n","import { NgModule } from '@angular/core';\nimport { ErrorComponent } from './error.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n declarations: [\n ErrorComponent\n ],\n imports: [\n FlexLayoutModule,\n MatButtonModule\n ],\n exports: [\n ErrorComponent\n ]\n})\nexport class ErrorComponentModule {}\n","import {\n NgModule,\n ModuleWithProviders,\n Provider\n} from '@angular/core';\nimport {\n ContainerComponentModule,\n LoadingComponentModule\n} from '@rxap/oauth';\nimport { ContinueComponentModule } from './continue/continue.component.module';\nimport { RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED } from './tokens';\nimport { OAuthSingleSignOnGuard } from './o-auth-single-sign-on.guard';\nimport { ErrorComponentModule } from './error/error.component.module';\n\nexport interface OAuthSingleSignOnOptions {\n redirectContinueDisabled?: boolean\n}\n\n@NgModule({\n exports: [\n ContinueComponentModule,\n LoadingComponentModule,\n ContainerComponentModule,\n ErrorComponentModule\n ],\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 { 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":[],"mappings":";;;;;;;;;;;;;;;;;;MAoBa,wBAAyB,SAAQ,YAAY;;;;;IASxD,YAEI,WAAwB,EAExB,qBAA4C,EAE5C,MAAc,EAGd,kBAAiC,IAAI,EAGrC,eAAmC,IAAI,EAGvC,SAAmC,IAAI,EAGvC,SAAmC,IAAI,EAGvC,kBAAmC,IAAI,EAGvC,cAAmC,IAAI;QAEzC,KAAK,CAAC,WAAW,EAAE,qBAAqB,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;QAjC1H,YAAO,GAAmB,IAAI,CAAC;QAC/B,aAAQ,GAAkB,IAAI,CAAC;KAiCrC;IAEM,MAAM,0BAA0B,CACrC,KAAa,EACb,QAAgB,EAChB,QAAiB;QAEjB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,0BAA0B,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnF,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,OAAO,QAAQ,CAAC;KACjB;IAEM,gBAAgB;QACrB,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,gBAAgB,IAAI,CAAC,WAAW,iBAAiB,IAAI,CAAC,YAAY,cAAc,IAAI,CAAC,SAAS,YAAY,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;KACnK;IAEM,MAAM,OAAO;QAClB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,WAAW,GAAQ,IAAI,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAO,IAAI,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAU,IAAI,CAAC;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;KAC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AAU;gBACrB,SAAS,EAAE,iBAAiB;gBAC5B,OAAO,EAAI;oBACT,OAAO,EAAE,cAAc;iBACxB;aACF;YACD;gBACE,IAAI,EAAO,OAAO;gBAClB,SAAS,EAAE,cAAc;aAC1B;YACD;gBACE,IAAI,EAAS,EAAE;gBACf,WAAW,EAAE,CAAE,sBAAsB,CAAE;gBACvC,SAAS,EAAI,gBAAgB;aAC9B;YACD;gBACE,IAAI,EAAQ,IAAI;gBAChB,UAAU,EAAE,EAAE;aACf;SACF;KACF;;;ACpCH;;;;;;"}
|
package/rxap-oauth.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
-
import { OAuthSingleSignOnService } from '../o-auth-single-sign-on.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ContinueComponent<Profile extends Record<string, any> = Record<string, any>> implements OnInit {
|
|
6
|
-
private readonly route;
|
|
7
|
-
private readonly router;
|
|
8
|
-
private readonly oAuthService;
|
|
9
|
-
private readonly redirectLogin;
|
|
10
|
-
profile: Promise<Profile>;
|
|
11
|
-
constructor(route: ActivatedRoute, router: Router, oAuthService: OAuthSingleSignOnService, redirectLogin: string[]);
|
|
12
|
-
ngOnInit(): void;
|
|
13
|
-
signOut(): Promise<boolean>;
|
|
14
|
-
redirect(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ContinueComponent<any>, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContinueComponent<any>, "rxap-continue", never, {}, {}, never, never>;
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./continue.component";
|
|
3
|
-
import * as i2 from "@angular/flex-layout";
|
|
4
|
-
import * as i3 from "@angular/material/icon";
|
|
5
|
-
import * as i4 from "@angular/material/button";
|
|
6
|
-
import * as i5 from "@angular/common";
|
|
7
|
-
import * as i6 from "@rxap/directives";
|
|
8
|
-
export declare class ContinueComponentModule {
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ContinueComponentModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ContinueComponentModule, [typeof i1.ContinueComponent], [typeof i2.FlexLayoutModule, typeof i3.MatIconModule, typeof i4.MatButtonModule, typeof i5.CommonModule, typeof i6.AvatarBackgroundImageDirectiveModule], [typeof i1.ContinueComponent]>;
|
|
11
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<ContinueComponentModule>;
|
|
12
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class ErrorComponent {
|
|
3
|
-
get topLevelDomain(): string;
|
|
4
|
-
get mainApplicationUrl(): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "rxap-error", never, {}, {}, never, never>;
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./error.component";
|
|
3
|
-
import * as i2 from "@angular/flex-layout";
|
|
4
|
-
import * as i3 from "@angular/material/button";
|
|
5
|
-
export declare class ErrorComponentModule {
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorComponentModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ErrorComponentModule, [typeof i1.ErrorComponent], [typeof i2.FlexLayoutModule, typeof i3.MatButtonModule], [typeof i1.ErrorComponent]>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<ErrorComponentModule>;
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./continue/continue.component.module";
|
|
4
|
-
import * as i2 from "@rxap/oauth";
|
|
5
|
-
import * as i3 from "./error/error.component.module";
|
|
6
|
-
export interface OAuthSingleSignOnOptions {
|
|
7
|
-
redirectContinueDisabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare class OAuthSingleSignOnRoutingModule {
|
|
10
|
-
static forRouting(options?: OAuthSingleSignOnOptions): ModuleWithProviders<OAuthSingleSignOnRoutingModule>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthSingleSignOnRoutingModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<OAuthSingleSignOnRoutingModule, never, never, [typeof i1.ContinueComponentModule, typeof i2.LoadingComponentModule, typeof i2.ContainerComponentModule, typeof i3.ErrorComponentModule]>;
|
|
13
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<OAuthSingleSignOnRoutingModule>;
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot, CanActivate, Router, UrlTree } from '@angular/router';
|
|
2
|
-
import { OAuthSingleSignOnService } from './o-auth-single-sign-on.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OAuthSingleSignOnGuard implements CanActivate {
|
|
5
|
-
private readonly authentication;
|
|
6
|
-
private readonly router;
|
|
7
|
-
private readonly redirectContinue;
|
|
8
|
-
private readonly redirectLogin;
|
|
9
|
-
private readonly redirectContinueDisabled;
|
|
10
|
-
constructor(authentication: OAuthSingleSignOnService, router: Router, redirectContinue: string[], redirectLogin: string[], redirectContinueDisabled: boolean | null);
|
|
11
|
-
canActivate(route: ActivatedRouteSnapshot): Promise<boolean | UrlTree>;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthSingleSignOnGuard, [null, null, null, null, { optional: true; }]>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthSingleSignOnGuard>;
|
|
14
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { OAuthService, OAuthMethodResponse, OAuthMethod, GetOAuthProfileMethod } from '@rxap/oauth';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OAuthSingleSignOnService extends OAuthService {
|
|
5
|
-
payload: string | null;
|
|
6
|
-
redirect: string | null;
|
|
7
|
-
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);
|
|
8
|
-
signInWithEmailAndPassword(email: string, password: string, remember: boolean): Promise<OAuthMethodResponse>;
|
|
9
|
-
redirectToClient(): void;
|
|
10
|
-
signOut(): Promise<void>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthSingleSignOnService, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthSingleSignOnService>;
|
|
13
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export declare function DefaultRedirectContinueFactory(): string[];
|
|
3
|
-
export declare const RXAP_O_AUTH_SINGLE_SIGN_ON_REDIRECT_CONTINUE: InjectionToken<string[]>;
|
|
4
|
-
export declare const RXAP_O_AUTH_SSO_REDIRECT_CONTINUE_DISABLED: InjectionToken<unknown>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"module": "../fesm2015/rxap-oauth-single-sign-on.mjs",
|
|
3
|
-
"es2020": "../fesm2020/rxap-oauth-single-sign-on.mjs",
|
|
4
|
-
"esm2020": "../esm2020/single-sign-on/rxap-oauth-single-sign-on.mjs",
|
|
5
|
-
"fesm2020": "../fesm2020/rxap-oauth-single-sign-on.mjs",
|
|
6
|
-
"fesm2015": "../fesm2015/rxap-oauth-single-sign-on.mjs",
|
|
7
|
-
"typings": "rxap-oauth-single-sign-on.d.ts",
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"name": "@rxap/oauth/single-sign-on"
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './lib/continue/continue.component.module';
|
|
2
|
-
export * from './lib/continue/continue.component';
|
|
3
|
-
export * from './lib/o-auth-single-sign-on.guard';
|
|
4
|
-
export * from './lib/o-auth-single-sign-on-routing.module';
|
|
5
|
-
export * from './lib/o-auth-single-sign-on.service';
|
|
6
|
-
export * from './lib/routes';
|
|
7
|
-
export * from './lib/tokens';
|
|
8
|
-
export * from './lib/error/error.component.module';
|
|
9
|
-
export * from './lib/error/error.component';
|