@juice-js/auth 1.0.0-alpha.9 → 1.2.0-alpha.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/fesm2022/juice-js-auth.mjs +68 -63
- package/fesm2022/juice-js-auth.mjs.map +1 -1
- package/package.json +6 -7
- package/types/juice-js-auth.d.ts +104 -0
- package/esm2022/juice-js-auth.mjs +0 -5
- package/esm2022/lib/auth/auth-module.config.mjs +0 -6
- package/esm2022/lib/auth/auth-routing.module.mjs +0 -39
- package/esm2022/lib/auth/auth.guard.mjs +0 -79
- package/esm2022/lib/auth/auth.interceptor.mjs +0 -28
- package/esm2022/lib/auth.module.mjs +0 -91
- package/esm2022/lib/pages/login/login.component.mjs +0 -27
- package/esm2022/lib/pages/login-completed/login-completed.component.mjs +0 -33
- package/esm2022/lib/pages/logout/logout.component.mjs +0 -20
- package/esm2022/lib/pages/logout-completed/logout-completed.component.mjs +0 -12
- package/esm2022/lib/pages/protected/user-info/user-info.component.mjs +0 -30
- package/esm2022/lib/pages/unauthorized/unauthorized.component.mjs +0 -12
- package/esm2022/public-api.mjs +0 -9
- package/index.d.ts +0 -5
- package/lib/auth/auth-module.config.d.ts +0 -3
- package/lib/auth/auth-routing.module.d.ts +0 -7
- package/lib/auth/auth.guard.d.ts +0 -20
- package/lib/auth/auth.interceptor.d.ts +0 -10
- package/lib/auth.module.d.ts +0 -16
- package/lib/pages/login/login.component.d.ts +0 -13
- package/lib/pages/login-completed/login-completed.component.d.ts +0 -13
- package/lib/pages/logout/logout.component.d.ts +0 -10
- package/lib/pages/logout-completed/logout-completed.component.d.ts +0 -5
- package/lib/pages/protected/user-info/user-info.component.d.ts +0 -15
- package/lib/pages/unauthorized/unauthorized.component.d.ts +0 -5
- package/public-api.d.ts +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Injectable, NgModule, Optional } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Injectable, NgModule, Optional } from '@angular/core';
|
|
3
3
|
import * as i3 from '@ngx-translate/core';
|
|
4
|
-
import {
|
|
4
|
+
import { TranslatePipe, TranslateDirective, provideChildTranslateService, MissingTranslationHandler } from '@ngx-translate/core';
|
|
5
5
|
import * as i1 from 'angular-oauth2-oidc';
|
|
6
6
|
import { AuthConfig } from 'angular-oauth2-oidc';
|
|
7
7
|
import * as i1$1 from '@angular/router';
|
|
@@ -30,13 +30,13 @@ class LoginComponent {
|
|
|
30
30
|
await this.oauthService.loadDiscoveryDocument();
|
|
31
31
|
this.oauthService.initLoginFlow(returnUrl);
|
|
32
32
|
}
|
|
33
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LoginComponent, deps: [{ token: i1.OAuthService }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: LoginComponent, isStandalone: false, selector: "page-login", ngImport: i0, template: "<div class=\"pt-4 text-center\">\n <p>{{'We are redirecting you to login page...' | translate }}</p>\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LoginComponent, decorators: [{
|
|
37
37
|
type: Component,
|
|
38
|
-
args: [{ selector: 'page-login', template: "<div class=\"pt-4 text-center\">\n <p>{{'We are redirecting you to login page...' | translate }}</p>\n</div>\n" }]
|
|
39
|
-
}], ctorParameters:
|
|
38
|
+
args: [{ selector: 'page-login', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"pt-4 text-center\">\n <p>{{'We are redirecting you to login page...' | translate }}</p>\n</div>\n" }]
|
|
39
|
+
}], ctorParameters: () => [{ type: i1.OAuthService }, { type: i1$1.ActivatedRoute }] });
|
|
40
40
|
|
|
41
41
|
class LoginCompletedComponent {
|
|
42
42
|
constructor(router, activatedRoute, oauthService) {
|
|
@@ -55,15 +55,15 @@ class LoginCompletedComponent {
|
|
|
55
55
|
}
|
|
56
56
|
this.router.navigateByUrl(redirectUrl);
|
|
57
57
|
});
|
|
58
|
-
await this.oauthService.loadDiscoveryDocumentAndTryLogin();
|
|
58
|
+
await this.oauthService.loadDiscoveryDocumentAndTryLogin({ disableNonceCheck: true });
|
|
59
59
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LoginCompletedComponent, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i1.OAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: LoginCompletedComponent, isStandalone: false, selector: "page-login-completed", ngImport: i0, template: "<div class=\"container pt-4\">\n <h1>{{'Login completed' | translate }}</h1>\n <p>{{'Just to confirm that you did it right!' | translate}}</p>\n\n <p>{{'We are now redirecting you to the requested page...' | translate}}</p>\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LoginCompletedComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
65
|
-
args: [{ selector: 'page-login-completed', template: "<div class=\"container pt-4\">\n <h1>{{'Login completed' | translate }}</h1>\n <p>{{'Just to confirm that you did it right!' | translate}}</p>\n\n <p>{{'We are now redirecting you to the requested page...' | translate}}</p>\n</div>\n" }]
|
|
66
|
-
}], ctorParameters:
|
|
65
|
+
args: [{ selector: 'page-login-completed', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"container pt-4\">\n <h1>{{'Login completed' | translate }}</h1>\n <p>{{'Just to confirm that you did it right!' | translate}}</p>\n\n <p>{{'We are now redirecting you to the requested page...' | translate}}</p>\n</div>\n" }]
|
|
66
|
+
}], ctorParameters: () => [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i1.OAuthService }] });
|
|
67
67
|
|
|
68
68
|
class LogoutComponent {
|
|
69
69
|
constructor(oauthService) {
|
|
@@ -73,30 +73,30 @@ class LogoutComponent {
|
|
|
73
73
|
await this.oauthService.loadDiscoveryDocument();
|
|
74
74
|
await this.oauthService.revokeTokenAndLogout();
|
|
75
75
|
}
|
|
76
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
77
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
76
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LogoutComponent, deps: [{ token: i1.OAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
77
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: LogoutComponent, isStandalone: false, selector: "page-logout", ngImport: i0, template: "<div class=\"pt-4 text-center\">\n <p>{{'We are logging you out...'| translate}}</p>\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
78
78
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LogoutComponent, decorators: [{
|
|
80
80
|
type: Component,
|
|
81
|
-
args: [{ selector: 'page-logout', template: "<div class=\"pt-4 text-center\">\n <p>{{'We are logging you out...'| translate}}</p>\n</div>\n" }]
|
|
82
|
-
}], ctorParameters:
|
|
81
|
+
args: [{ selector: 'page-logout', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"pt-4 text-center\">\n <p>{{'We are logging you out...'| translate}}</p>\n</div>\n" }]
|
|
82
|
+
}], ctorParameters: () => [{ type: i1.OAuthService }] });
|
|
83
83
|
|
|
84
84
|
class LogoutCompletedComponent {
|
|
85
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
85
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LogoutCompletedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
86
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: LogoutCompletedComponent, isStandalone: false, selector: "page-logout-completed", ngImport: i0, template: "<div class=\"container pt-4\">\n <h1>{{'Logout' | translate}}</h1>\n <p>{{'You successfully logged out from the application.' | translate}}</p>\n\n <p>{{'If you want to access the application again,' | translate}} <a routerLink=\"../login\">{{'log in' | translate}}</a>.</p>\n</div>\n", styles: [""], dependencies: [{ kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
87
87
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LogoutCompletedComponent, decorators: [{
|
|
89
89
|
type: Component,
|
|
90
|
-
args: [{ selector: 'page-logout-completed', template: "<div class=\"container pt-4\">\n <h1>{{'Logout' | translate}}</h1>\n <p>{{'You successfully logged out from the application.' | translate}}</p>\n\n <p>{{'If you want to access the application again,' | translate}} <a routerLink=\"../login\">{{'log in' | translate}}</a>.</p>\n</div>\n" }]
|
|
90
|
+
args: [{ selector: 'page-logout-completed', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"container pt-4\">\n <h1>{{'Logout' | translate}}</h1>\n <p>{{'You successfully logged out from the application.' | translate}}</p>\n\n <p>{{'If you want to access the application again,' | translate}} <a routerLink=\"../login\">{{'log in' | translate}}</a>.</p>\n</div>\n" }]
|
|
91
91
|
}] });
|
|
92
92
|
|
|
93
93
|
class UnauthorizedComponent {
|
|
94
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
95
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
94
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: UnauthorizedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
95
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: UnauthorizedComponent, isStandalone: false, selector: "page-unauthorized", ngImport: i0, template: "<div class=\"container pt-4\">\n <h1>{{'Unauthorized' | translate }}</h1>\n <p>{{ 'You are unauthorized to access this resource.' | translate}}</p>\n </div>\n ", dependencies: [{ kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
96
96
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: UnauthorizedComponent, decorators: [{
|
|
98
98
|
type: Component,
|
|
99
|
-
args: [{ selector: 'page-unauthorized', template: "<div class=\"container pt-4\">\n <h1>{{'Unauthorized' | translate }}</h1>\n <p>{{ 'You are unauthorized to access this resource.' | translate}}</p>\n </div>\n " }]
|
|
99
|
+
args: [{ selector: 'page-unauthorized', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<div class=\"container pt-4\">\n <h1>{{'Unauthorized' | translate }}</h1>\n <p>{{ 'You are unauthorized to access this resource.' | translate}}</p>\n </div>\n " }]
|
|
100
100
|
}] });
|
|
101
101
|
|
|
102
102
|
class UserInfoComponent {
|
|
@@ -116,13 +116,13 @@ class UserInfoComponent {
|
|
|
116
116
|
this.userInfo = JSON.stringify(info, null, 2);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
120
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: UserInfoComponent, deps: [{ token: i1.OAuthService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
120
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: UserInfoComponent, isStandalone: false, selector: "page-user-info", ngImport: i0, template: "<h1>{{'User info' | translate}} </h1>\n<pre>{{userInfo}}</pre>\n\n<h5>{{'Access Token' | translate}}</h5>\n<pre>{{accessToken}}</pre>\n\n<h5>{{'ID Token' | translate}}</h5>\n<pre>{{idToken}}</pre>\n", styles: [""], dependencies: [{ kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
|
|
121
121
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: UserInfoComponent, decorators: [{
|
|
123
123
|
type: Component,
|
|
124
|
-
args: [{ selector: 'page-user-info', template: "<h1>{{'User info' | translate}} </h1>\n<pre>{{userInfo}}</pre>\n\n<h5>{{'Access Token' | translate}}</h5>\n<pre>{{accessToken}}</pre>\n\n<h5>{{'ID Token' | translate}}</h5>\n<pre>{{idToken}}</pre>\n" }]
|
|
125
|
-
}], ctorParameters:
|
|
124
|
+
args: [{ selector: 'page-user-info', changeDetection: ChangeDetectionStrategy.Eager, standalone: false, template: "<h1>{{'User info' | translate}} </h1>\n<pre>{{userInfo}}</pre>\n\n<h5>{{'Access Token' | translate}}</h5>\n<pre>{{accessToken}}</pre>\n\n<h5>{{'ID Token' | translate}}</h5>\n<pre>{{idToken}}</pre>\n" }]
|
|
125
|
+
}], ctorParameters: () => [{ type: i1.OAuthService }, { type: i2.HttpClient }] });
|
|
126
126
|
|
|
127
127
|
class AuthModuleConfig {
|
|
128
128
|
constructor() {
|
|
@@ -148,12 +148,12 @@ class AuthInterceptor {
|
|
|
148
148
|
}
|
|
149
149
|
return next.handle(req);
|
|
150
150
|
}
|
|
151
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
152
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthInterceptor, deps: [{ token: i1.OAuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
152
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthInterceptor }); }
|
|
153
153
|
}
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthInterceptor, decorators: [{
|
|
155
155
|
type: Injectable
|
|
156
|
-
}], ctorParameters:
|
|
156
|
+
}], ctorParameters: () => [{ type: i1.OAuthService }] });
|
|
157
157
|
|
|
158
158
|
class AuthModule {
|
|
159
159
|
static forRoot(options) {
|
|
@@ -176,7 +176,7 @@ class AuthModule {
|
|
|
176
176
|
var authConfig = new AuthConfig(options);
|
|
177
177
|
// Replace :tenant with the current tenant
|
|
178
178
|
if (tenantService) {
|
|
179
|
-
let identifier = '/' + tenantService.currentTenant?.identifier
|
|
179
|
+
let identifier = '/' + tenantService.currentTenant?.identifier || '';
|
|
180
180
|
authConfig.issuer = options.issuer?.replace('/:tenant', identifier);
|
|
181
181
|
authConfig.redirectUri = options.redirectUri?.replace('/:tenant', identifier);
|
|
182
182
|
authConfig.postLogoutRedirectUri = options.postLogoutRedirectUri?.replace('/:tenant', identifier);
|
|
@@ -188,23 +188,25 @@ class AuthModule {
|
|
|
188
188
|
]
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
192
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
192
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: AuthModule, declarations: [LoginComponent,
|
|
193
193
|
LoginCompletedComponent,
|
|
194
194
|
LogoutComponent,
|
|
195
195
|
LogoutCompletedComponent,
|
|
196
196
|
UnauthorizedComponent,
|
|
197
|
-
UserInfoComponent], imports: [
|
|
198
|
-
|
|
197
|
+
UserInfoComponent], imports: [TranslatePipe,
|
|
198
|
+
TranslateDirective,
|
|
199
|
+
MatDialogModule] }); }
|
|
200
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthModule, providers: [
|
|
201
|
+
provideChildTranslateService({
|
|
199
202
|
missingTranslationHandler: {
|
|
200
203
|
provide: MissingTranslationHandler,
|
|
201
204
|
useClass: SubmitMissingTranslationHandler
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
MatDialogModule] }); }
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
], imports: [MatDialogModule] }); }
|
|
206
208
|
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthModule, decorators: [{
|
|
208
210
|
type: NgModule,
|
|
209
211
|
args: [{
|
|
210
212
|
declarations: [
|
|
@@ -216,16 +218,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
216
218
|
UserInfoComponent
|
|
217
219
|
],
|
|
218
220
|
imports: [
|
|
219
|
-
|
|
221
|
+
TranslatePipe,
|
|
222
|
+
TranslateDirective,
|
|
223
|
+
MatDialogModule
|
|
224
|
+
],
|
|
225
|
+
exports: [],
|
|
226
|
+
providers: [
|
|
227
|
+
provideChildTranslateService({
|
|
220
228
|
missingTranslationHandler: {
|
|
221
229
|
provide: MissingTranslationHandler,
|
|
222
230
|
useClass: SubmitMissingTranslationHandler
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
MatDialogModule
|
|
227
|
-
],
|
|
228
|
-
exports: []
|
|
231
|
+
}
|
|
232
|
+
})
|
|
233
|
+
]
|
|
229
234
|
}]
|
|
230
235
|
}] });
|
|
231
236
|
|
|
@@ -237,7 +242,7 @@ class AuthGuard {
|
|
|
237
242
|
this.tenantService = tenantService;
|
|
238
243
|
this.path = new URL(this.options.basePath).pathname;
|
|
239
244
|
if (tenantService) {
|
|
240
|
-
var identifier = '/' + tenantService.currentTenant?.identifier
|
|
245
|
+
var identifier = '/' + tenantService.currentTenant?.identifier || '';
|
|
241
246
|
this.path = this.path.replace('/:tenant', identifier);
|
|
242
247
|
}
|
|
243
248
|
}
|
|
@@ -251,7 +256,7 @@ class AuthGuard {
|
|
|
251
256
|
}
|
|
252
257
|
return this.router.createUrlTree([`${this.path}/unauthorized`]);
|
|
253
258
|
}
|
|
254
|
-
return from(this.oauthService.loadDiscoveryDocumentAndTryLogin()).pipe(map(() => {
|
|
259
|
+
return from(this.oauthService.loadDiscoveryDocumentAndTryLogin({ disableNonceCheck: true })).pipe(map(() => {
|
|
255
260
|
if (this.hasValidToken()) {
|
|
256
261
|
if (this.hasValidRole(route)) {
|
|
257
262
|
return true;
|
|
@@ -288,17 +293,17 @@ class AuthGuard {
|
|
|
288
293
|
var match = issuer.match(/\/([^\/]+)\/?$/);
|
|
289
294
|
return match?.[1];
|
|
290
295
|
}
|
|
291
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
292
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
296
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthGuard, deps: [{ token: i1$1.Router }, { token: i1.OAuthService }, { token: AuthModuleConfig }, { token: i4.TenantService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
297
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
|
|
293
298
|
}
|
|
294
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthGuard, decorators: [{
|
|
295
300
|
type: Injectable,
|
|
296
301
|
args: [{
|
|
297
302
|
providedIn: 'root'
|
|
298
303
|
}]
|
|
299
|
-
}], ctorParameters:
|
|
304
|
+
}], ctorParameters: () => [{ type: i1$1.Router }, { type: i1.OAuthService }, { type: AuthModuleConfig }, { type: i4.TenantService, decorators: [{
|
|
300
305
|
type: Optional
|
|
301
|
-
}] }]
|
|
306
|
+
}] }] });
|
|
302
307
|
|
|
303
308
|
const routes = [
|
|
304
309
|
{ path: 'login', component: LoginComponent, title: 'Login' },
|
|
@@ -315,11 +320,11 @@ const routes = [
|
|
|
315
320
|
{ path: '', redirectTo: 'user-info', pathMatch: 'full' },
|
|
316
321
|
];
|
|
317
322
|
class AuthRoutingModule {
|
|
318
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
319
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
320
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
324
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: AuthRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
|
|
325
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
321
326
|
}
|
|
322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AuthRoutingModule, decorators: [{
|
|
323
328
|
type: NgModule,
|
|
324
329
|
args: [{
|
|
325
330
|
imports: [RouterModule.forChild(routes)],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-auth.mjs","sources":["../../../../projects/juice-js/auth/src/lib/pages/login/login.component.ts","../../../../projects/juice-js/auth/src/lib/pages/login/login.component.html","../../../../projects/juice-js/auth/src/lib/pages/login-completed/login-completed.component.ts","../../../../projects/juice-js/auth/src/lib/pages/login-completed/login-completed.component.html","../../../../projects/juice-js/auth/src/lib/pages/logout/logout.component.ts","../../../../projects/juice-js/auth/src/lib/pages/logout/logout.component.html","../../../../projects/juice-js/auth/src/lib/pages/logout-completed/logout-completed.component.ts","../../../../projects/juice-js/auth/src/lib/pages/logout-completed/logout-completed.component.html","../../../../projects/juice-js/auth/src/lib/pages/unauthorized/unauthorized.component.ts","../../../../projects/juice-js/auth/src/lib/pages/unauthorized/unauthorized.component.html","../../../../projects/juice-js/auth/src/lib/pages/protected/user-info/user-info.component.ts","../../../../projects/juice-js/auth/src/lib/pages/protected/user-info/user-info.component.html","../../../../projects/juice-js/auth/src/lib/auth/auth-module.config.ts","../../../../projects/juice-js/auth/src/lib/auth/auth.interceptor.ts","../../../../projects/juice-js/auth/src/lib/auth.module.ts","../../../../projects/juice-js/auth/src/lib/auth/auth.guard.ts","../../../../projects/juice-js/auth/src/lib/auth/auth-routing.module.ts","../../../../projects/juice-js/auth/src/public-api.ts","../../../../projects/juice-js/auth/src/juice-js-auth.ts"],"sourcesContent":["import {Component, OnInit} from '@angular/core';\nimport {OAuthService} from \"angular-oauth2-oidc\";\nimport {ActivatedRoute} from \"@angular/router\";\n\n@Component({\n selector: 'page-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.css']\n})\nexport class LoginComponent implements OnInit {\n\n constructor(private oauthService: OAuthService, private activatedRoute: ActivatedRoute) {\n }\n\n async ngOnInit() {\n const returnUrl = this.activatedRoute.snapshot.queryParams[\"returnUrl\"] ?? '/home';\n\n console.log('[Login] returnUrl', this.activatedRoute.snapshot.queryParams[\"returnUrl\"]);\n\n await this.login(returnUrl);\n }\n\n async login(returnUrl: string) {\n await this.oauthService.loadDiscoveryDocument();\n this.oauthService.initLoginFlow(returnUrl);\n }\n}\n","<div class=\"pt-4 text-center\">\n <p>{{'We are redirecting you to login page...' | translate }}</p>\n</div>\n","import {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute, Router} from \"@angular/router\";\nimport {OAuthService} from \"angular-oauth2-oidc\";\nimport {delay, filter} from \"rxjs/operators\";\n\n@Component({\n selector: 'page-login-completed',\n templateUrl: './login-completed.component.html',\n styleUrls: ['./login-completed.component.css']\n})\nexport class LoginCompletedComponent implements OnInit {\n\n constructor(private router: Router, private activatedRoute: ActivatedRoute, private oauthService: OAuthService) {\n }\n\n async ngOnInit() {\n this.oauthService.events.pipe(\n filter(e => e.type === \"token_received\"),\n delay(2000)\n ).subscribe((e) => {\n // `this.oauthService.state` contains the redirect url after login, if any\n\n let redirectUrl = '';\n if (this.oauthService.state) {\n // TODO: should validate the return url. Also, check if the return URL belongs Wto the current application.\n redirectUrl = decodeURIComponent(decodeURIComponent(this.oauthService.state));\n console.log(redirectUrl);\n }\n\n this.router.navigateByUrl(redirectUrl);\n });\n\n await this.oauthService.loadDiscoveryDocumentAndTryLogin();\n }\n\n}\n","<div class=\"container pt-4\">\n <h1>{{'Login completed' | translate }}</h1>\n <p>{{'Just to confirm that you did it right!' | translate}}</p>\n\n <p>{{'We are now redirecting you to the requested page...' | translate}}</p>\n</div>\n","import { Component, OnInit } from '@angular/core';\nimport {OAuthService} from \"angular-oauth2-oidc\";\n\n@Component({\n selector: 'page-logout',\n templateUrl: './logout.component.html',\n styleUrls: ['./logout.component.css']\n})\nexport class LogoutComponent implements OnInit {\n\n constructor(private oauthService: OAuthService) { }\n\n async ngOnInit() {\n await this.oauthService.loadDiscoveryDocument();\n await this.oauthService.revokeTokenAndLogout();\n }\n\n}\n","<div class=\"pt-4 text-center\">\n <p>{{'We are logging you out...'| translate}}</p>\n</div>\n","import {Component} from '@angular/core';\n\n@Component({\n selector: 'page-logout-completed',\n templateUrl: './logout-completed.component.html',\n styleUrls: ['./logout-completed.component.css']\n})\nexport class LogoutCompletedComponent {\n}\n","<div class=\"container pt-4\">\n <h1>{{'Logout' | translate}}</h1>\n <p>{{'You successfully logged out from the application.' | translate}}</p>\n\n <p>{{'If you want to access the application again,' | translate}} <a routerLink=\"../login\">{{'log in' | translate}}</a>.</p>\n</div>\n","import {Component} from '@angular/core';\n\n@Component({\n selector: 'page-unauthorized',\n templateUrl: './unauthorized.component.html'\n})\nexport class UnauthorizedComponent {\n}","<div class=\"container pt-4\">\n <h1>{{'Unauthorized' | translate }}</h1>\n <p>{{ 'You are unauthorized to access this resource.' | translate}}</p>\n </div>\n ","import { HttpClient } from '@angular/common/http';\nimport {Component, OnInit} from '@angular/core';\nimport {OAuthService} from \"angular-oauth2-oidc\";\n\n@Component({\n selector: 'page-user-info',\n templateUrl: './user-info.component.html',\n styleUrls: ['./user-info.component.css']\n})\nexport class UserInfoComponent implements OnInit {\n\n userInfo = '';\n accessToken = '';\n idToken = '';\n\n constructor(private oauthService: OAuthService, private http: HttpClient) {\n }\n\n async ngOnInit() {\n this.accessToken = this.oauthService.getAccessToken();\n this.idToken = this.oauthService.getIdToken();\n\n console.log(this.oauthService.getIdentityClaims());\n\n await this.oauthService.loadDiscoveryDocument();\n\n this.oauthService.loadUserProfile().then(info => {\n this.userInfo = JSON.stringify(info, null, 2);\n });\n\n }\n}\n","<h1>{{'User info' | translate}} </h1>\n<pre>{{userInfo}}</pre>\n\n<h5>{{'Access Token' | translate}}</h5>\n<pre>{{accessToken}}</pre>\n\n<h5>{{'ID Token' | translate}}</h5>\n<pre>{{idToken}}</pre>\n","export class AuthModuleConfig{\n basePath: string = \"\";\n}\n","import { HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { OAuthService } from 'angular-oauth2-oidc';\n\n@Injectable()\nexport class AuthInterceptor implements HttpInterceptor {\n\n constructor(private auth: OAuthService) {}\n\n intercept(req: HttpRequest<any>, next: HttpHandler) {\n // Get the auth token from the service.\n if(this.auth.hasValidAccessToken()){\n const authToken = this.auth.getAccessToken();\n\n // Clone the request and replace the original headers with\n // cloned headers, updated with the authorization.\n const authReq = req.clone({\n headers: req.headers.set('Authorization', `Bearer ${authToken}`)\n });\n\n // send cloned request with header to the next handler.\n return next.handle(authReq);\n }\n return next.handle(req);\n }\n}","import { ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { TranslateModule, MissingTranslationHandler } from '@ngx-translate/core';\n\nimport { LoginComponent } from './pages/login/login.component';\nimport { LoginCompletedComponent } from './pages/login-completed/login-completed.component';\nimport { LogoutComponent } from './pages/logout/logout.component';\nimport { LogoutCompletedComponent } from './pages/logout-completed/logout-completed.component';\nimport { UnauthorizedComponent } from './pages/unauthorized/unauthorized.component';\nimport { UserInfoComponent } from './pages/protected/user-info/user-info.component';\nimport { AuthModuleConfig } from './auth/auth-module.config';\nimport { AuthInterceptor } from './auth/auth.interceptor'\n\nimport { SubmitMissingTranslationHandler } from '@juice-js/localize';\nimport { AuthConfig } from 'angular-oauth2-oidc';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { TenantService } from '@juice-js/core';\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\n\n@NgModule({\n declarations: [\n LoginComponent,\n LoginCompletedComponent,\n LogoutComponent,\n LogoutCompletedComponent,\n UnauthorizedComponent,\n UserInfoComponent\n ],\n imports: [\n TranslateModule.forChild({\n missingTranslationHandler: {\n provide: MissingTranslationHandler,\n useClass: SubmitMissingTranslationHandler\n },\n defaultLanguage: 'en-US'\n }),\n MatDialogModule\n ],\n exports: [\n ]\n})\nexport class AuthModule {\n public static forRoot(options : any): ModuleWithProviders<AuthModule> {\n return {\n ngModule: AuthModule,\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: AuthInterceptor,\n multi: true\n },\n {\n provide: AuthModuleConfig,\n useValue: options\n },\n {\n provide: AuthConfig,\n useFactory: (tenantService: TenantService) : AuthConfig => {\n // Create config from options\n var authConfig = new AuthConfig(options);\n // Replace :tenant with the current tenant\n if(tenantService){\n let identifier = '/' + tenantService.currentTenant?.identifier??'';\n authConfig.issuer = options.issuer?.replace('/:tenant', identifier);\n authConfig.redirectUri = options.redirectUri?.replace('/:tenant', identifier);\n authConfig.postLogoutRedirectUri = options.postLogoutRedirectUri?.replace('/:tenant', identifier);\n }\n return authConfig;\n },\n deps: [TenantService]\n }\n ]\n }\n }\n}\n","import {Injectable, Optional} from '@angular/core';\nimport {ActivatedRouteSnapshot, Router, RouterStateSnapshot} from '@angular/router';\nimport {OAuthService} from 'angular-oauth2-oidc';\nimport {from} from \"rxjs\";\nimport {map} from \"rxjs/operators\";\nimport { AuthModuleConfig } from './auth-module.config';\nimport { TenantService } from '@juice-js/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthGuard {\n path: string;\n constructor(private router: Router, private oauthService: OAuthService,\n private options: AuthModuleConfig, @Optional() private tenantService: TenantService){\n this.path = new URL(this.options.basePath).pathname;\n if(tenantService){\n var identifier = '/' + tenantService.currentTenant?.identifier??'';\n this.path = this.path.replace('/:tenant', identifier);\n }\n }\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\n if (this.hasValidToken()) {\n if(!this.hasValidTenant()){\n return this.router.createUrlTree([`${this.path}/login`], {queryParams: {returnUrl: state.url}});\n }\n if(this.hasValidRole(route)){\n return true;\n }\n return this.router.createUrlTree([`${this.path}/unauthorized`]);\n }\n\n return from(this.oauthService.loadDiscoveryDocumentAndTryLogin()).pipe(\n map(() => {\n if (this.hasValidToken()) {\n if(this.hasValidRole(route)){\n return true;\n }\n return this.router.createUrlTree([`${this.path}/unauthorized`]);\n }\n\n return this.router.createUrlTree([`${this.path}/login`], {queryParams: {returnUrl: state.url}});\n })\n )\n }\n\n private hasValidRole(route: ActivatedRouteSnapshot){\n const claims = this.oauthService.getIdentityClaims();\n var {roles} = route.data;\n var {role} = claims;\n \n if(roles \n && ((typeof role ==\"string\" && !roles.includes(role)) \n || ( Array.isArray(role) && !role.some(r=> roles.includes(r))))){\n return false;\n }\n return true;\n }\n\n private hasValidToken() {\n return this.oauthService.hasValidAccessToken() && this.oauthService.hasValidIdToken();\n }\n\n private hasValidTenant(){\n if(!this.tenantService){\n return true;\n }\n const claims = this.oauthService.getIdentityClaims();\n var tenant = this.tenantService?.currentTenant?.identifier;\n var issuer = claims['iss'];\n return !tenant || this.getTenantFromIssuer(issuer) === tenant;\n }\n\n private getTenantFromIssuer(issuer: string){\n var match = issuer.match(/\\/([^\\/]+)\\/?$/);\n return match?.[1];\n }\n}","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { LogoutCompletedComponent } from \"../pages/logout-completed/logout-completed.component\";\nimport { LoginComponent } from \"../pages/login/login.component\";\nimport { LoginCompletedComponent } from \"../pages/login-completed/login-completed.component\";\nimport { UserInfoComponent } from \"../pages/protected/user-info/user-info.component\";\nimport { LogoutComponent } from \"../pages/logout/logout.component\";\nimport { UnauthorizedComponent } from '../pages/unauthorized/unauthorized.component';\nimport { AuthGuard } from './auth.guard';\nimport { DevGuard } from '@juice-js/layout';\n\nconst routes: Routes = [\n {path: 'login', component: LoginComponent, title: 'Login'},\n {path: 'login-completed', component: LoginCompletedComponent, title: 'Login completed'},\n {path: 'logout', component: LogoutComponent},\n {path: 'logout-completed', component: LogoutCompletedComponent, title: 'Logout completed'},\n {path: 'unauthorized', component: UnauthorizedComponent, title: 'Unauthorized'},\n {path: 'user-info', component: UserInfoComponent, canActivate: [AuthGuard, DevGuard], title: 'User info',\n data:{\n menuDisplay: [DevGuard],\n menuIcon: 'account_circle',\n menuOrder: 100,\n }},\n {path: '', redirectTo: 'user-info', pathMatch: 'full'},\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class AuthRoutingModule{\n \n}","/*\n * Public API Surface of auth\n */\n\nexport * from './lib/auth.module';\nexport * from './lib/auth/auth.guard';\nexport * from './lib/auth/auth.interceptor';\nexport * from './lib/auth/auth-module.config';\nexport * from './lib/auth/auth-routing.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1","i3.AuthModuleConfig"],"mappings":";;;;;;;;;;;;;;;;;;MASa,cAAc,CAAA;IAEzB,WAAoB,CAAA,YAA0B,EAAU,cAA8B,EAAA;QAAlE,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;QAAU,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;KACrF;AAED,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC;AAEnF,QAAA,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;AAExF,QAAA,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;KAC7B;IAED,MAAM,KAAK,CAAC,SAAiB,EAAA;AAC3B,QAAA,MAAM,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC;AAChD,QAAA,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;KAC5C;+GAhBU,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,EAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,cAAA,EAAA,CAAA,EAAA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,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,0CAFlB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;gHAEX,iBAAiB,EAAA,OAAA,EAAA,CAHlB,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC7B,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAEX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACxC,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA,CAAA;;;AC7BD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"juice-js-auth.mjs","sources":["../../../../projects/juice-js/auth/src/lib/pages/login/login.component.ts","../../../../projects/juice-js/auth/src/lib/pages/login/login.component.html","../../../../projects/juice-js/auth/src/lib/pages/login-completed/login-completed.component.ts","../../../../projects/juice-js/auth/src/lib/pages/login-completed/login-completed.component.html","../../../../projects/juice-js/auth/src/lib/pages/logout/logout.component.ts","../../../../projects/juice-js/auth/src/lib/pages/logout/logout.component.html","../../../../projects/juice-js/auth/src/lib/pages/logout-completed/logout-completed.component.ts","../../../../projects/juice-js/auth/src/lib/pages/logout-completed/logout-completed.component.html","../../../../projects/juice-js/auth/src/lib/pages/unauthorized/unauthorized.component.ts","../../../../projects/juice-js/auth/src/lib/pages/unauthorized/unauthorized.component.html","../../../../projects/juice-js/auth/src/lib/pages/protected/user-info/user-info.component.ts","../../../../projects/juice-js/auth/src/lib/pages/protected/user-info/user-info.component.html","../../../../projects/juice-js/auth/src/lib/auth/auth-module.config.ts","../../../../projects/juice-js/auth/src/lib/auth/auth.interceptor.ts","../../../../projects/juice-js/auth/src/lib/auth.module.ts","../../../../projects/juice-js/auth/src/lib/auth/auth.guard.ts","../../../../projects/juice-js/auth/src/lib/auth/auth-routing.module.ts","../../../../projects/juice-js/auth/src/public-api.ts","../../../../projects/juice-js/auth/src/juice-js-auth.ts"],"sourcesContent":["import {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';\nimport {OAuthService} from \"angular-oauth2-oidc\";\nimport {ActivatedRoute} from \"@angular/router\";\n\n@Component({\n selector: 'page-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class LoginComponent implements OnInit {\n\n constructor(private oauthService: OAuthService, private activatedRoute: ActivatedRoute) {\n }\n\n async ngOnInit() {\n const returnUrl = this.activatedRoute.snapshot.queryParams[\"returnUrl\"] ?? '/home';\n\n console.log('[Login] returnUrl', this.activatedRoute.snapshot.queryParams[\"returnUrl\"]);\n\n await this.login(returnUrl);\n }\n\n async login(returnUrl: string) {\n await this.oauthService.loadDiscoveryDocument();\n this.oauthService.initLoginFlow(returnUrl);\n }\n}\n","<div class=\"pt-4 text-center\">\n <p>{{'We are redirecting you to login page...' | translate }}</p>\n</div>\n","import {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';\nimport {ActivatedRoute, Router} from \"@angular/router\";\nimport {OAuthService} from \"angular-oauth2-oidc\";\nimport {delay, filter} from \"rxjs/operators\";\n\n@Component({\n selector: 'page-login-completed',\n templateUrl: './login-completed.component.html',\n styleUrls: ['./login-completed.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class LoginCompletedComponent implements OnInit {\n\n constructor(private router: Router, private activatedRoute: ActivatedRoute, private oauthService: OAuthService) {\n }\n\n async ngOnInit() {\n this.oauthService.events.pipe(\n filter(e => e.type === \"token_received\"),\n delay(2000)\n ).subscribe((e) => {\n // `this.oauthService.state` contains the redirect url after login, if any\n\n let redirectUrl = '';\n if (this.oauthService.state) {\n // TODO: should validate the return url. Also, check if the return URL belongs Wto the current application.\n redirectUrl = decodeURIComponent(decodeURIComponent(this.oauthService.state));\n console.log(redirectUrl);\n }\n\n this.router.navigateByUrl(redirectUrl);\n });\n\n await this.oauthService.loadDiscoveryDocumentAndTryLogin({disableNonceCheck: true});\n }\n\n}\n","<div class=\"container pt-4\">\n <h1>{{'Login completed' | translate }}</h1>\n <p>{{'Just to confirm that you did it right!' | translate}}</p>\n\n <p>{{'We are now redirecting you to the requested page...' | translate}}</p>\n</div>\n","import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport {OAuthService} from \"angular-oauth2-oidc\";\n\n@Component({\n selector: 'page-logout',\n templateUrl: './logout.component.html',\n styleUrls: ['./logout.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class LogoutComponent implements OnInit {\n\n constructor(private oauthService: OAuthService) { }\n\n async ngOnInit() {\n await this.oauthService.loadDiscoveryDocument();\n await this.oauthService.revokeTokenAndLogout();\n }\n\n}\n","<div class=\"pt-4 text-center\">\n <p>{{'We are logging you out...'| translate}}</p>\n</div>\n","import {Component, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'page-logout-completed',\n templateUrl: './logout-completed.component.html',\n styleUrls: ['./logout-completed.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class LogoutCompletedComponent {\n}\n","<div class=\"container pt-4\">\n <h1>{{'Logout' | translate}}</h1>\n <p>{{'You successfully logged out from the application.' | translate}}</p>\n\n <p>{{'If you want to access the application again,' | translate}} <a routerLink=\"../login\">{{'log in' | translate}}</a>.</p>\n</div>\n","import {Component, ChangeDetectionStrategy} from '@angular/core';\n\n@Component({\n selector: 'page-unauthorized',\n templateUrl: './unauthorized.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class UnauthorizedComponent {\n}","<div class=\"container pt-4\">\n <h1>{{'Unauthorized' | translate }}</h1>\n <p>{{ 'You are unauthorized to access this resource.' | translate}}</p>\n </div>\n ","import { HttpClient } from '@angular/common/http';\nimport {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';\nimport {OAuthService} from \"angular-oauth2-oidc\";\n\n@Component({\n selector: 'page-user-info',\n templateUrl: './user-info.component.html',\n styleUrls: ['./user-info.component.css'],\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: false\n})\nexport class UserInfoComponent implements OnInit {\n\n userInfo = '';\n accessToken = '';\n idToken = '';\n\n constructor(private oauthService: OAuthService, private http: HttpClient) {\n }\n\n async ngOnInit() {\n this.accessToken = this.oauthService.getAccessToken();\n this.idToken = this.oauthService.getIdToken();\n\n console.log(this.oauthService.getIdentityClaims());\n\n await this.oauthService.loadDiscoveryDocument();\n\n this.oauthService.loadUserProfile().then(info => {\n this.userInfo = JSON.stringify(info, null, 2);\n });\n\n }\n}\n","<h1>{{'User info' | translate}} </h1>\n<pre>{{userInfo}}</pre>\n\n<h5>{{'Access Token' | translate}}</h5>\n<pre>{{accessToken}}</pre>\n\n<h5>{{'ID Token' | translate}}</h5>\n<pre>{{idToken}}</pre>\n","export class AuthModuleConfig{\n basePath: string = \"\";\n}\n","import { HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { OAuthService } from 'angular-oauth2-oidc';\n\n@Injectable()\nexport class AuthInterceptor implements HttpInterceptor {\n\n constructor(private auth: OAuthService) {}\n\n intercept(req: HttpRequest<any>, next: HttpHandler) {\n // Get the auth token from the service.\n if(this.auth.hasValidAccessToken()){\n const authToken = this.auth.getAccessToken();\n\n // Clone the request and replace the original headers with\n // cloned headers, updated with the authorization.\n const authReq = req.clone({\n headers: req.headers.set('Authorization', `Bearer ${authToken}`)\n });\n\n // send cloned request with header to the next handler.\n return next.handle(authReq);\n }\n return next.handle(req);\n }\n}","import { ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { TranslatePipe, TranslateDirective, MissingTranslationHandler, provideChildTranslateService } from '@ngx-translate/core';\n\nimport { LoginComponent } from './pages/login/login.component';\nimport { LoginCompletedComponent } from './pages/login-completed/login-completed.component';\nimport { LogoutComponent } from './pages/logout/logout.component';\nimport { LogoutCompletedComponent } from './pages/logout-completed/logout-completed.component';\nimport { UnauthorizedComponent } from './pages/unauthorized/unauthorized.component';\nimport { UserInfoComponent } from './pages/protected/user-info/user-info.component';\nimport { AuthModuleConfig } from './auth/auth-module.config';\nimport { AuthInterceptor } from './auth/auth.interceptor'\n\nimport { SubmitMissingTranslationHandler } from '@juice-js/localize';\nimport { AuthConfig } from 'angular-oauth2-oidc';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { TenantService } from '@juice-js/core';\nimport { HTTP_INTERCEPTORS } from '@angular/common/http';\n\n@NgModule({\n declarations: [\n LoginComponent,\n LoginCompletedComponent,\n LogoutComponent,\n LogoutCompletedComponent,\n UnauthorizedComponent,\n UserInfoComponent\n ],\n imports: [\n TranslatePipe,\n TranslateDirective,\n MatDialogModule\n ],\n exports: [\n ],\n providers: [\n provideChildTranslateService({\n missingTranslationHandler: {\n provide: MissingTranslationHandler,\n useClass: SubmitMissingTranslationHandler\n }\n })\n ]\n})\nexport class AuthModule {\n public static forRoot(options : any): ModuleWithProviders<AuthModule> {\n return {\n ngModule: AuthModule,\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: AuthInterceptor,\n multi: true\n },\n {\n provide: AuthModuleConfig,\n useValue: options\n },\n {\n provide: AuthConfig,\n useFactory: (tenantService: TenantService) : AuthConfig => {\n // Create config from options\n var authConfig = new AuthConfig(options);\n // Replace :tenant with the current tenant\n if(tenantService){\n let identifier = '/' + tenantService.currentTenant?.identifier||'';\n authConfig.issuer = options.issuer?.replace('/:tenant', identifier);\n authConfig.redirectUri = options.redirectUri?.replace('/:tenant', identifier);\n authConfig.postLogoutRedirectUri = options.postLogoutRedirectUri?.replace('/:tenant', identifier);\n }\n return authConfig;\n },\n deps: [TenantService]\n }\n ]\n }\n }\n}\n","import {Injectable, Optional} from '@angular/core';\nimport {ActivatedRouteSnapshot, Router, RouterStateSnapshot} from '@angular/router';\nimport {OAuthService} from 'angular-oauth2-oidc';\nimport {from} from \"rxjs\";\nimport {map} from \"rxjs/operators\";\nimport { AuthModuleConfig } from './auth-module.config';\nimport { TenantService } from '@juice-js/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthGuard {\n path: string;\n constructor(private router: Router, private oauthService: OAuthService,\n private options: AuthModuleConfig, @Optional() private tenantService: TenantService){\n this.path = new URL(this.options.basePath).pathname;\n if(tenantService){\n var identifier = '/' + tenantService.currentTenant?.identifier||'';\n this.path = this.path.replace('/:tenant', identifier);\n }\n }\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\n if (this.hasValidToken()) {\n if(!this.hasValidTenant()){\n return this.router.createUrlTree([`${this.path}/login`], {queryParams: {returnUrl: state.url}});\n }\n if(this.hasValidRole(route)){\n return true;\n }\n return this.router.createUrlTree([`${this.path}/unauthorized`]);\n }\n\n return from(this.oauthService.loadDiscoveryDocumentAndTryLogin({disableNonceCheck: true})).pipe(\n map(() => {\n if (this.hasValidToken()) {\n if(this.hasValidRole(route)){\n return true;\n }\n return this.router.createUrlTree([`${this.path}/unauthorized`]);\n }\n\n return this.router.createUrlTree([`${this.path}/login`], {queryParams: {returnUrl: state.url}});\n })\n )\n }\n\n private hasValidRole(route: ActivatedRouteSnapshot){\n const claims = this.oauthService.getIdentityClaims();\n var {roles} = route.data;\n var {role} = claims;\n \n if(roles \n && ((typeof role ==\"string\" && !roles.includes(role)) \n || ( Array.isArray(role) && !role.some(r=> roles.includes(r))))){\n return false;\n }\n return true;\n }\n\n private hasValidToken() {\n return this.oauthService.hasValidAccessToken() && this.oauthService.hasValidIdToken();\n }\n\n private hasValidTenant(){\n if(!this.tenantService){\n return true;\n }\n const claims = this.oauthService.getIdentityClaims();\n var tenant = this.tenantService?.currentTenant?.identifier;\n var issuer = claims['iss'];\n return !tenant || this.getTenantFromIssuer(issuer) === tenant;\n }\n\n private getTenantFromIssuer(issuer: string){\n var match = issuer.match(/\\/([^\\/]+)\\/?$/);\n return match?.[1];\n }\n}","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { LogoutCompletedComponent } from \"../pages/logout-completed/logout-completed.component\";\nimport { LoginComponent } from \"../pages/login/login.component\";\nimport { LoginCompletedComponent } from \"../pages/login-completed/login-completed.component\";\nimport { UserInfoComponent } from \"../pages/protected/user-info/user-info.component\";\nimport { LogoutComponent } from \"../pages/logout/logout.component\";\nimport { UnauthorizedComponent } from '../pages/unauthorized/unauthorized.component';\nimport { AuthGuard } from './auth.guard';\nimport { DevGuard } from '@juice-js/layout';\n\nconst routes: Routes = [\n {path: 'login', component: LoginComponent, title: 'Login'},\n {path: 'login-completed', component: LoginCompletedComponent, title: 'Login completed'},\n {path: 'logout', component: LogoutComponent},\n {path: 'logout-completed', component: LogoutCompletedComponent, title: 'Logout completed'},\n {path: 'unauthorized', component: UnauthorizedComponent, title: 'Unauthorized'},\n {path: 'user-info', component: UserInfoComponent, canActivate: [AuthGuard, DevGuard], title: 'User info',\n data:{\n menuDisplay: [DevGuard],\n menuIcon: 'account_circle',\n menuOrder: 100,\n }},\n {path: '', redirectTo: 'user-info', pathMatch: 'full'},\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class AuthRoutingModule{\n \n}","/*\n * Public API Surface of auth\n */\n\nexport * from './lib/auth.module';\nexport * from './lib/auth/auth.guard';\nexport * from './lib/auth/auth.interceptor';\nexport * from './lib/auth/auth-module.config';\nexport * from './lib/auth/auth-routing.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1","i3.AuthModuleConfig"],"mappings":";;;;;;;;;;;;;;;;;;MAWa,cAAc,CAAA;IAEzB,WA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A,CAAA;+GAEX,iBAAiB,EAAA,OAAA,EAAA,CAHlB,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC7B,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAEX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACxC,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;AC7BD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juice-js/auth",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-alpha.1",
|
|
4
4
|
"description": "Provides authentication and authorization for applications.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "jack@creatorflow.io"
|
|
@@ -19,25 +19,24 @@
|
|
|
19
19
|
"url": "git+https://github.com/creatorflow-io/juice-layout.git"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@juice-js/layout": "1.
|
|
22
|
+
"@juice-js/layout": "1.2.0-alpha.1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"tslib": "^2.3.0"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"module": "fesm2022/juice-js-auth.mjs",
|
|
29
|
-
"typings": "
|
|
29
|
+
"typings": "types/juice-js-auth.d.ts",
|
|
30
30
|
"exports": {
|
|
31
31
|
"./package.json": {
|
|
32
32
|
"default": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
".": {
|
|
35
|
-
"types": "./
|
|
36
|
-
"esm2022": "./esm2022/juice-js-auth.mjs",
|
|
37
|
-
"esm": "./esm2022/juice-js-auth.mjs",
|
|
35
|
+
"types": "./types/juice-js-auth.d.ts",
|
|
38
36
|
"default": "./fesm2022/juice-js-auth.mjs"
|
|
39
37
|
}
|
|
40
38
|
},
|
|
39
|
+
"type": "module",
|
|
41
40
|
"readme": "ERROR: No README data found!",
|
|
42
|
-
"_id": "@juice-js/auth@1.
|
|
41
|
+
"_id": "@juice-js/auth@1.2.0-alpha.1"
|
|
43
42
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, ModuleWithProviders } from '@angular/core';
|
|
3
|
+
import { OAuthService } from 'angular-oauth2-oidc';
|
|
4
|
+
import * as _angular_router from '@angular/router';
|
|
5
|
+
import { ActivatedRoute, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
6
|
+
import * as _angular_common_http from '@angular/common/http';
|
|
7
|
+
import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
|
|
8
|
+
import * as i7 from '@ngx-translate/core';
|
|
9
|
+
import * as i8 from '@angular/material/dialog';
|
|
10
|
+
import * as rxjs from 'rxjs';
|
|
11
|
+
import { TenantService } from '@juice-js/core';
|
|
12
|
+
|
|
13
|
+
declare class LoginComponent implements OnInit {
|
|
14
|
+
private oauthService;
|
|
15
|
+
private activatedRoute;
|
|
16
|
+
constructor(oauthService: OAuthService, activatedRoute: ActivatedRoute);
|
|
17
|
+
ngOnInit(): Promise<void>;
|
|
18
|
+
login(returnUrl: string): Promise<void>;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "page-login", never, {}, {}, never, never, false, never>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare class LoginCompletedComponent implements OnInit {
|
|
24
|
+
private router;
|
|
25
|
+
private activatedRoute;
|
|
26
|
+
private oauthService;
|
|
27
|
+
constructor(router: Router, activatedRoute: ActivatedRoute, oauthService: OAuthService);
|
|
28
|
+
ngOnInit(): Promise<void>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginCompletedComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginCompletedComponent, "page-login-completed", never, {}, {}, never, never, false, never>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare class LogoutComponent implements OnInit {
|
|
34
|
+
private oauthService;
|
|
35
|
+
constructor(oauthService: OAuthService);
|
|
36
|
+
ngOnInit(): Promise<void>;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LogoutComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LogoutComponent, "page-logout", never, {}, {}, never, never, false, never>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare class LogoutCompletedComponent {
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LogoutCompletedComponent, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LogoutCompletedComponent, "page-logout-completed", never, {}, {}, never, never, false, never>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class UnauthorizedComponent {
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UnauthorizedComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UnauthorizedComponent, "page-unauthorized", never, {}, {}, never, never, false, never>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare class UserInfoComponent implements OnInit {
|
|
52
|
+
private oauthService;
|
|
53
|
+
private http;
|
|
54
|
+
userInfo: string;
|
|
55
|
+
accessToken: string;
|
|
56
|
+
idToken: string;
|
|
57
|
+
constructor(oauthService: OAuthService, http: HttpClient);
|
|
58
|
+
ngOnInit(): Promise<void>;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserInfoComponent, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserInfoComponent, "page-user-info", never, {}, {}, never, never, false, never>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class AuthModule {
|
|
64
|
+
static forRoot(options: any): ModuleWithProviders<AuthModule>;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthModule, never>;
|
|
66
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, [typeof LoginComponent, typeof LoginCompletedComponent, typeof LogoutComponent, typeof LogoutCompletedComponent, typeof UnauthorizedComponent, typeof UserInfoComponent], [typeof i7.TranslatePipe, typeof i7.TranslateDirective, typeof i8.MatDialogModule], never>;
|
|
67
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AuthModule>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class AuthModuleConfig {
|
|
71
|
+
basePath: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare class AuthGuard {
|
|
75
|
+
private router;
|
|
76
|
+
private oauthService;
|
|
77
|
+
private options;
|
|
78
|
+
private tenantService;
|
|
79
|
+
path: string;
|
|
80
|
+
constructor(router: Router, oauthService: OAuthService, options: AuthModuleConfig, tenantService: TenantService);
|
|
81
|
+
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): true | _angular_router.UrlTree | rxjs.Observable<true | _angular_router.UrlTree>;
|
|
82
|
+
private hasValidRole;
|
|
83
|
+
private hasValidToken;
|
|
84
|
+
private hasValidTenant;
|
|
85
|
+
private getTenantFromIssuer;
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuard, [null, null, null, { optional: true; }]>;
|
|
87
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuard>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare class AuthInterceptor implements HttpInterceptor {
|
|
91
|
+
private auth;
|
|
92
|
+
constructor(auth: OAuthService);
|
|
93
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): rxjs.Observable<_angular_common_http.HttpEvent<any>>;
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthInterceptor, never>;
|
|
95
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthInterceptor>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare class AuthRoutingModule {
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthRoutingModule, never>;
|
|
100
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthRoutingModule, never, [typeof _angular_router.RouterModule], [typeof _angular_router.RouterModule]>;
|
|
101
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AuthRoutingModule>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { AuthGuard, AuthInterceptor, AuthModule, AuthModuleConfig, AuthRoutingModule };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianVpY2UtanMtYXV0aC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2p1aWNlLWpzL2F1dGgvc3JjL2p1aWNlLWpzLWF1dGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export class AuthModuleConfig {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.basePath = "";
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC1tb2R1bGUuY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvanVpY2UtanMvYXV0aC9zcmMvbGliL2F1dGgvYXV0aC1tb2R1bGUuY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sT0FBTyxnQkFBZ0I7SUFBN0I7UUFDSSxhQUFRLEdBQVcsRUFBRSxDQUFDO0lBQzFCLENBQUM7Q0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBBdXRoTW9kdWxlQ29uZmlne1xuICAgIGJhc2VQYXRoOiBzdHJpbmcgPSBcIlwiO1xufVxuIl19
|