@huntsman-cancer-institute/authentication 16.0.1 → 17.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/authentication.component.d.ts +27 -27
- package/authentication.module.d.ts +24 -24
- package/authentication.provider.d.ts +16 -16
- package/authentication.service.d.ts +123 -123
- package/authorization.interceptor.d.ts +11 -11
- package/directlogin.component.d.ts +21 -21
- package/esm2022/authentication.component.mjs +112 -112
- package/esm2022/authentication.module.mjs +103 -103
- package/esm2022/authentication.provider.mjs +36 -36
- package/esm2022/authentication.service.mjs +393 -393
- package/esm2022/authorization.interceptor.mjs +79 -79
- package/esm2022/directlogin.component.mjs +47 -47
- package/esm2022/huntsman-cancer-institute-authentication.mjs +4 -4
- package/esm2022/index.mjs +12 -12
- package/esm2022/route-guard.service.mjs +22 -22
- package/esm2022/timeout-notification.component.mjs +117 -117
- package/fesm2022/huntsman-cancer-institute-authentication.mjs +831 -831
- package/fesm2022/huntsman-cancer-institute-authentication.mjs.map +1 -1
- package/index.d.ts +12 -12
- package/package.json +4 -4
- package/route-guard.service.d.ts +1 -1
- package/timeout-notification.component.d.ts +14 -14
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { ElementRef, Renderer2 } from "@angular/core";
|
|
2
|
-
import { Location } from "@angular/common";
|
|
3
|
-
import { Router } from "@angular/router";
|
|
4
|
-
import { DomSanitizer } from "@angular/platform-browser";
|
|
5
|
-
import { AuthenticationService } from "./authentication.service";
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class AuthenticationComponent {
|
|
8
|
-
private authenticationService;
|
|
9
|
-
private domSanitizer;
|
|
10
|
-
private router;
|
|
11
|
-
private location;
|
|
12
|
-
private renderer;
|
|
13
|
-
private authenticationRoute;
|
|
14
|
-
url: any;
|
|
15
|
-
_errorMsg: string;
|
|
16
|
-
iframe: ElementRef;
|
|
17
|
-
private resetSubscription;
|
|
18
|
-
private popstateSubscription;
|
|
19
|
-
constructor(authenticationService: AuthenticationService, domSanitizer: DomSanitizer, router: Router, location: Location, renderer: Renderer2, authenticationRoute: string);
|
|
20
|
-
ngOnInit(): void;
|
|
21
|
-
handleChanges(): void;
|
|
22
|
-
ngOnDestroy(): void;
|
|
23
|
-
private clearLoginAndRetry;
|
|
24
|
-
private beginAuthenticationProcess;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AuthenticationComponent, "authentication-iframe", never, {}, {}, never, never, false, never>;
|
|
27
|
-
}
|
|
1
|
+
import { ElementRef, Renderer2 } from "@angular/core";
|
|
2
|
+
import { Location } from "@angular/common";
|
|
3
|
+
import { Router } from "@angular/router";
|
|
4
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
5
|
+
import { AuthenticationService } from "./authentication.service";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class AuthenticationComponent {
|
|
8
|
+
private authenticationService;
|
|
9
|
+
private domSanitizer;
|
|
10
|
+
private router;
|
|
11
|
+
private location;
|
|
12
|
+
private renderer;
|
|
13
|
+
private authenticationRoute;
|
|
14
|
+
url: any;
|
|
15
|
+
_errorMsg: string;
|
|
16
|
+
iframe: ElementRef;
|
|
17
|
+
private resetSubscription;
|
|
18
|
+
private popstateSubscription;
|
|
19
|
+
constructor(authenticationService: AuthenticationService, domSanitizer: DomSanitizer, router: Router, location: Location, renderer: Renderer2, authenticationRoute: string);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
handleChanges(): void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
private clearLoginAndRetry;
|
|
24
|
+
private beginAuthenticationProcess;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuthenticationComponent, "authentication-iframe", never, {}, {}, never, never, false, never>;
|
|
27
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ModuleWithProviders } from "@angular/core";
|
|
2
|
-
import { JwtModule } from "@auth0/angular-jwt";
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./authentication.component";
|
|
5
|
-
import * as i2 from "./directlogin.component";
|
|
6
|
-
import * as i3 from "./timeout-notification.component";
|
|
7
|
-
import * as i4 from "@angular/common";
|
|
8
|
-
import * as i5 from "@angular/common/http";
|
|
9
|
-
import * as i6 from "@angular/router";
|
|
10
|
-
import * as i7 from "@angular/forms";
|
|
11
|
-
import * as i8 from "@angular-cool/storage";
|
|
12
|
-
/**
|
|
13
|
-
* Provide a single auth service and interceptor for the implementing application. Also provide everything
|
|
14
|
-
* from the angular-jwt library.
|
|
15
|
-
*
|
|
16
|
-
* @since 1.0.0
|
|
17
|
-
*/
|
|
18
|
-
export declare class AuthenticationModule {
|
|
19
|
-
constructor(parentModule: JwtModule);
|
|
20
|
-
static forRoot(): ModuleWithProviders<AuthenticationModule>;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationModule, [{ optional: true; skipSelf: true; }]>;
|
|
22
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthenticationModule, [typeof i1.AuthenticationComponent, typeof i2.DirectLoginComponent, typeof i3.TimeoutNotificationComponent], [typeof i4.CommonModule, typeof i5.HttpClientModule, typeof i6.RouterModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.CoolStorageModule], [typeof i1.AuthenticationComponent, typeof i2.DirectLoginComponent, typeof i3.TimeoutNotificationComponent]>;
|
|
23
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AuthenticationModule>;
|
|
24
|
-
}
|
|
1
|
+
import { ModuleWithProviders } from "@angular/core";
|
|
2
|
+
import { JwtModule } from "@auth0/angular-jwt";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./authentication.component";
|
|
5
|
+
import * as i2 from "./directlogin.component";
|
|
6
|
+
import * as i3 from "./timeout-notification.component";
|
|
7
|
+
import * as i4 from "@angular/common";
|
|
8
|
+
import * as i5 from "@angular/common/http";
|
|
9
|
+
import * as i6 from "@angular/router";
|
|
10
|
+
import * as i7 from "@angular/forms";
|
|
11
|
+
import * as i8 from "@angular-cool/storage";
|
|
12
|
+
/**
|
|
13
|
+
* Provide a single auth service and interceptor for the implementing application. Also provide everything
|
|
14
|
+
* from the angular-jwt library.
|
|
15
|
+
*
|
|
16
|
+
* @since 1.0.0
|
|
17
|
+
*/
|
|
18
|
+
export declare class AuthenticationModule {
|
|
19
|
+
constructor(parentModule: JwtModule);
|
|
20
|
+
static forRoot(): ModuleWithProviders<AuthenticationModule>;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationModule, [{ optional: true; skipSelf: true; }]>;
|
|
22
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthenticationModule, [typeof i1.AuthenticationComponent, typeof i2.DirectLoginComponent, typeof i3.TimeoutNotificationComponent], [typeof i4.CommonModule, typeof i5.HttpClientModule, typeof i6.RouterModule, typeof i7.FormsModule, typeof i7.ReactiveFormsModule, typeof i8.CoolStorageModule], [typeof i1.AuthenticationComponent, typeof i2.DirectLoginComponent, typeof i3.TimeoutNotificationComponent]>;
|
|
23
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AuthenticationModule>;
|
|
24
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { InjectionToken } from "@angular/core";
|
|
2
|
-
import { CoolLocalStorage } from '@angular-cool/storage';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare let AUTHENTICATION_TOKEN_KEY: InjectionToken<string>;
|
|
5
|
-
export declare class AuthenticationProvider {
|
|
6
|
-
private _localStorageService;
|
|
7
|
-
private _authenticationTokenKey;
|
|
8
|
-
whitelistedDomains: (string | RegExp)[];
|
|
9
|
-
constructor(_localStorageService: CoolLocalStorage, _authenticationTokenKey: string);
|
|
10
|
-
tokenGetter: () => string;
|
|
11
|
-
get authenticationTokenKey(): string;
|
|
12
|
-
set authenticationTokenKey(_authenticationTokenKey: string);
|
|
13
|
-
get authToken(): string;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationProvider, never>;
|
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationProvider>;
|
|
16
|
-
}
|
|
1
|
+
import { InjectionToken } from "@angular/core";
|
|
2
|
+
import { CoolLocalStorage } from '@angular-cool/storage';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare let AUTHENTICATION_TOKEN_KEY: InjectionToken<string>;
|
|
5
|
+
export declare class AuthenticationProvider {
|
|
6
|
+
private _localStorageService;
|
|
7
|
+
private _authenticationTokenKey;
|
|
8
|
+
whitelistedDomains: (string | RegExp)[];
|
|
9
|
+
constructor(_localStorageService: CoolLocalStorage, _authenticationTokenKey: string);
|
|
10
|
+
tokenGetter: () => string;
|
|
11
|
+
get authenticationTokenKey(): string;
|
|
12
|
+
set authenticationTokenKey(_authenticationTokenKey: string);
|
|
13
|
+
get authToken(): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationProvider, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationProvider>;
|
|
16
|
+
}
|
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
import { InjectionToken } from "@angular/core";
|
|
2
|
-
import { LocationStrategy } from "@angular/common";
|
|
3
|
-
import { Router } from "@angular/router";
|
|
4
|
-
import { HttpClient, HttpHeaders, HttpRequest } from "@angular/common/http";
|
|
5
|
-
import { Observable, BehaviorSubject } from "rxjs";
|
|
6
|
-
import { JwtHelperService } from "@auth0/angular-jwt";
|
|
7
|
-
import { AuthenticationProvider } from "./authentication.provider";
|
|
8
|
-
import { CoolLocalStorage } from "@angular-cool/storage";
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* The token used for injection of the server side endpoint for the currently authenticated subject.
|
|
12
|
-
*
|
|
13
|
-
* @type {InjectionToken}
|
|
14
|
-
*/
|
|
15
|
-
export declare let AUTHENTICATION_SERVER_URL: InjectionToken<string>;
|
|
16
|
-
export declare let AUTHENTICATION_LOGOUT_PATH: InjectionToken<string>;
|
|
17
|
-
export declare let AUTHENTICATION_DIRECT_ENDPOINT: InjectionToken<string>;
|
|
18
|
-
export declare let AUTHENTICATION_TOKEN_ENDPOINT: InjectionToken<string>;
|
|
19
|
-
export declare let AUTHENTICATION_ROUTE: InjectionToken<string>;
|
|
20
|
-
export declare let AUTHENTICATION_MAX_INACTIVITY_MINUTES: InjectionToken<number>;
|
|
21
|
-
export declare let AUTHENTICATION_USER_COUNTDOWN_SECONDS: InjectionToken<number>;
|
|
22
|
-
export declare let AUTHENTICATION_IDP_INACTIVITY_MINUTES: InjectionToken<number>;
|
|
23
|
-
/**
|
|
24
|
-
* @since 1.0.0
|
|
25
|
-
*/
|
|
26
|
-
export declare class AuthenticationService {
|
|
27
|
-
private _http;
|
|
28
|
-
private _router;
|
|
29
|
-
private _localStorageService;
|
|
30
|
-
private _jwtHelper;
|
|
31
|
-
private authenticationProvider;
|
|
32
|
-
private _authenticationRoute;
|
|
33
|
-
private _logoutPath;
|
|
34
|
-
private _tokenEndpoint;
|
|
35
|
-
private _serverUrl;
|
|
36
|
-
private _directEndpoint;
|
|
37
|
-
private _maxInactivity;
|
|
38
|
-
private _userCountdownSeconds;
|
|
39
|
-
private _idpInactivityMinutes;
|
|
40
|
-
private locationStrategy;
|
|
41
|
-
/**
|
|
42
|
-
* The generic error message used when a server error is thrown without a status.
|
|
43
|
-
*
|
|
44
|
-
* @type {string}
|
|
45
|
-
*/
|
|
46
|
-
static GENERIC_ERR_MSG: string;
|
|
47
|
-
private static CONTENT_TYPE;
|
|
48
|
-
private static SEC_GOV_CLASS_HEADER;
|
|
49
|
-
private static SEC_GOV_ID_HEADER;
|
|
50
|
-
private static DEIDENT_HEADER;
|
|
51
|
-
private static LIMITED_HEADER;
|
|
52
|
-
userCountdownSeconds: number;
|
|
53
|
-
idpInactivityMinutes: number;
|
|
54
|
-
contentType: string;
|
|
55
|
-
securityGovernorClass: string;
|
|
56
|
-
securityGovernorId: number;
|
|
57
|
-
limitedContext: boolean;
|
|
58
|
-
deidentifiedContext: boolean;
|
|
59
|
-
private maxViewPermission;
|
|
60
|
-
private _isAuthenticatedSubject;
|
|
61
|
-
private _userIsAboutToTimeOut;
|
|
62
|
-
private _redirectUrl;
|
|
63
|
-
private _refreshSubscription;
|
|
64
|
-
private _lastUserInteraction;
|
|
65
|
-
private _maxInactivityMinutes;
|
|
66
|
-
private baseUrl;
|
|
67
|
-
private contextRoot;
|
|
68
|
-
constructor(_http: HttpClient, _router: Router, _localStorageService: CoolLocalStorage, _jwtHelper: JwtHelperService, authenticationProvider: AuthenticationProvider, _authenticationRoute: string, _logoutPath: string, _tokenEndpoint: string, _serverUrl: string, _directEndpoint: string, _maxInactivity: number, _userCountdownSeconds: number, _idpInactivityMinutes: number, locationStrategy: LocationStrategy);
|
|
69
|
-
getBaseUrl(): string;
|
|
70
|
-
getContextRoot(): string;
|
|
71
|
-
getHeaders(req: HttpRequest<any>): HttpHeaders;
|
|
72
|
-
get authenticationTokenKey(): string;
|
|
73
|
-
get authToken(): string;
|
|
74
|
-
updateUserActivity(): void;
|
|
75
|
-
/**
|
|
76
|
-
* A mutator for identifying the clients original request location. Setting this value will influence the end location
|
|
77
|
-
* navigated to by {@link #navigateToPath}.
|
|
78
|
-
*
|
|
79
|
-
* @param redirectUrl location of the users request before authentication
|
|
80
|
-
*/
|
|
81
|
-
set redirectUrl(redirectUrl: string);
|
|
82
|
-
get redirectUrl(): string;
|
|
83
|
-
requestAccessToken(redirectOnSuccess: boolean): void;
|
|
84
|
-
/**
|
|
85
|
-
* Verifies whether or not a current user session exists.
|
|
86
|
-
*
|
|
87
|
-
* @returns {Observable<boolean>} evaluates to true if the user is authenticated, false otherwise.
|
|
88
|
-
*/
|
|
89
|
-
isAuthenticated(): Observable<boolean>;
|
|
90
|
-
isAboutToTimeOut(): Observable<boolean>;
|
|
91
|
-
getTimeoutStart(): number;
|
|
92
|
-
tokenLocation(): string;
|
|
93
|
-
directLoginLocation(): string;
|
|
94
|
-
logoutLocation(): string;
|
|
95
|
-
/**
|
|
96
|
-
* A function to authenticated the user with the provided credentials. Failure results in an error that describes the
|
|
97
|
-
* server response (status and status message) and should be actionable by the client application.
|
|
98
|
-
*
|
|
99
|
-
* @param username of the authenticating user to verify
|
|
100
|
-
* @param password of the authenticating user to verify
|
|
101
|
-
* @returns {Observable<R>} describing the result of the login action, true or an error
|
|
102
|
-
*/
|
|
103
|
-
login(_username: string, _password: string): Observable<boolean>;
|
|
104
|
-
clearLogin(): Observable<Response>;
|
|
105
|
-
/**
|
|
106
|
-
* A function to signal the termination of the current session. Invoking this function will clean up any relevant state
|
|
107
|
-
* related to the last active session.
|
|
108
|
-
*/
|
|
109
|
-
logout(keepCurrentRoute?: boolean): void;
|
|
110
|
-
storeToken(token: string): void;
|
|
111
|
-
proceedIfAuthenticated(): boolean;
|
|
112
|
-
validateToken(token: string): boolean;
|
|
113
|
-
subscribeToTokenRefresh(token: any): void;
|
|
114
|
-
unsubscribeFromTokenRefresh(): void;
|
|
115
|
-
getMaxViewPermission(): "view" | "viewident" | "viewlimited";
|
|
116
|
-
getMaxViewPermissionSubject(): BehaviorSubject<"view" | "viewident" | "viewlimited">;
|
|
117
|
-
setMaxViewPermission(maxViewPermission: "view" | "viewident" | "viewlimited"): void;
|
|
118
|
-
private refreshTokenIfUserIsActive;
|
|
119
|
-
private hasValidConfig;
|
|
120
|
-
private handleError;
|
|
121
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, [null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
122
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationService>;
|
|
123
|
-
}
|
|
1
|
+
import { InjectionToken } from "@angular/core";
|
|
2
|
+
import { LocationStrategy } from "@angular/common";
|
|
3
|
+
import { Router } from "@angular/router";
|
|
4
|
+
import { HttpClient, HttpHeaders, HttpRequest } from "@angular/common/http";
|
|
5
|
+
import { Observable, BehaviorSubject } from "rxjs";
|
|
6
|
+
import { JwtHelperService } from "@auth0/angular-jwt";
|
|
7
|
+
import { AuthenticationProvider } from "./authentication.provider";
|
|
8
|
+
import { CoolLocalStorage } from "@angular-cool/storage";
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* The token used for injection of the server side endpoint for the currently authenticated subject.
|
|
12
|
+
*
|
|
13
|
+
* @type {InjectionToken}
|
|
14
|
+
*/
|
|
15
|
+
export declare let AUTHENTICATION_SERVER_URL: InjectionToken<string>;
|
|
16
|
+
export declare let AUTHENTICATION_LOGOUT_PATH: InjectionToken<string>;
|
|
17
|
+
export declare let AUTHENTICATION_DIRECT_ENDPOINT: InjectionToken<string>;
|
|
18
|
+
export declare let AUTHENTICATION_TOKEN_ENDPOINT: InjectionToken<string>;
|
|
19
|
+
export declare let AUTHENTICATION_ROUTE: InjectionToken<string>;
|
|
20
|
+
export declare let AUTHENTICATION_MAX_INACTIVITY_MINUTES: InjectionToken<number>;
|
|
21
|
+
export declare let AUTHENTICATION_USER_COUNTDOWN_SECONDS: InjectionToken<number>;
|
|
22
|
+
export declare let AUTHENTICATION_IDP_INACTIVITY_MINUTES: InjectionToken<number>;
|
|
23
|
+
/**
|
|
24
|
+
* @since 1.0.0
|
|
25
|
+
*/
|
|
26
|
+
export declare class AuthenticationService {
|
|
27
|
+
private _http;
|
|
28
|
+
private _router;
|
|
29
|
+
private _localStorageService;
|
|
30
|
+
private _jwtHelper;
|
|
31
|
+
private authenticationProvider;
|
|
32
|
+
private _authenticationRoute;
|
|
33
|
+
private _logoutPath;
|
|
34
|
+
private _tokenEndpoint;
|
|
35
|
+
private _serverUrl;
|
|
36
|
+
private _directEndpoint;
|
|
37
|
+
private _maxInactivity;
|
|
38
|
+
private _userCountdownSeconds;
|
|
39
|
+
private _idpInactivityMinutes;
|
|
40
|
+
private locationStrategy;
|
|
41
|
+
/**
|
|
42
|
+
* The generic error message used when a server error is thrown without a status.
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
*/
|
|
46
|
+
static GENERIC_ERR_MSG: string;
|
|
47
|
+
private static CONTENT_TYPE;
|
|
48
|
+
private static SEC_GOV_CLASS_HEADER;
|
|
49
|
+
private static SEC_GOV_ID_HEADER;
|
|
50
|
+
private static DEIDENT_HEADER;
|
|
51
|
+
private static LIMITED_HEADER;
|
|
52
|
+
userCountdownSeconds: number;
|
|
53
|
+
idpInactivityMinutes: number;
|
|
54
|
+
contentType: string;
|
|
55
|
+
securityGovernorClass: string;
|
|
56
|
+
securityGovernorId: number;
|
|
57
|
+
limitedContext: boolean;
|
|
58
|
+
deidentifiedContext: boolean;
|
|
59
|
+
private maxViewPermission;
|
|
60
|
+
private _isAuthenticatedSubject;
|
|
61
|
+
private _userIsAboutToTimeOut;
|
|
62
|
+
private _redirectUrl;
|
|
63
|
+
private _refreshSubscription;
|
|
64
|
+
private _lastUserInteraction;
|
|
65
|
+
private _maxInactivityMinutes;
|
|
66
|
+
private baseUrl;
|
|
67
|
+
private contextRoot;
|
|
68
|
+
constructor(_http: HttpClient, _router: Router, _localStorageService: CoolLocalStorage, _jwtHelper: JwtHelperService, authenticationProvider: AuthenticationProvider, _authenticationRoute: string, _logoutPath: string, _tokenEndpoint: string, _serverUrl: string, _directEndpoint: string, _maxInactivity: number, _userCountdownSeconds: number, _idpInactivityMinutes: number, locationStrategy: LocationStrategy);
|
|
69
|
+
getBaseUrl(): string;
|
|
70
|
+
getContextRoot(): string;
|
|
71
|
+
getHeaders(req: HttpRequest<any>): HttpHeaders;
|
|
72
|
+
get authenticationTokenKey(): string;
|
|
73
|
+
get authToken(): string;
|
|
74
|
+
updateUserActivity(): void;
|
|
75
|
+
/**
|
|
76
|
+
* A mutator for identifying the clients original request location. Setting this value will influence the end location
|
|
77
|
+
* navigated to by {@link #navigateToPath}.
|
|
78
|
+
*
|
|
79
|
+
* @param redirectUrl location of the users request before authentication
|
|
80
|
+
*/
|
|
81
|
+
set redirectUrl(redirectUrl: string);
|
|
82
|
+
get redirectUrl(): string;
|
|
83
|
+
requestAccessToken(redirectOnSuccess: boolean): void;
|
|
84
|
+
/**
|
|
85
|
+
* Verifies whether or not a current user session exists.
|
|
86
|
+
*
|
|
87
|
+
* @returns {Observable<boolean>} evaluates to true if the user is authenticated, false otherwise.
|
|
88
|
+
*/
|
|
89
|
+
isAuthenticated(): Observable<boolean>;
|
|
90
|
+
isAboutToTimeOut(): Observable<boolean>;
|
|
91
|
+
getTimeoutStart(): number;
|
|
92
|
+
tokenLocation(): string;
|
|
93
|
+
directLoginLocation(): string;
|
|
94
|
+
logoutLocation(): string;
|
|
95
|
+
/**
|
|
96
|
+
* A function to authenticated the user with the provided credentials. Failure results in an error that describes the
|
|
97
|
+
* server response (status and status message) and should be actionable by the client application.
|
|
98
|
+
*
|
|
99
|
+
* @param username of the authenticating user to verify
|
|
100
|
+
* @param password of the authenticating user to verify
|
|
101
|
+
* @returns {Observable<R>} describing the result of the login action, true or an error
|
|
102
|
+
*/
|
|
103
|
+
login(_username: string, _password: string): Observable<boolean>;
|
|
104
|
+
clearLogin(): Observable<Response>;
|
|
105
|
+
/**
|
|
106
|
+
* A function to signal the termination of the current session. Invoking this function will clean up any relevant state
|
|
107
|
+
* related to the last active session.
|
|
108
|
+
*/
|
|
109
|
+
logout(keepCurrentRoute?: boolean): void;
|
|
110
|
+
storeToken(token: string): void;
|
|
111
|
+
proceedIfAuthenticated(): boolean;
|
|
112
|
+
validateToken(token: string): boolean;
|
|
113
|
+
subscribeToTokenRefresh(token: any): void;
|
|
114
|
+
unsubscribeFromTokenRefresh(): void;
|
|
115
|
+
getMaxViewPermission(): "view" | "viewident" | "viewlimited";
|
|
116
|
+
getMaxViewPermissionSubject(): BehaviorSubject<"view" | "viewident" | "viewlimited">;
|
|
117
|
+
setMaxViewPermission(maxViewPermission: "view" | "viewident" | "viewlimited"): void;
|
|
118
|
+
private refreshTokenIfUserIsActive;
|
|
119
|
+
private hasValidConfig;
|
|
120
|
+
private handleError;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticationService, [null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
122
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthenticationService>;
|
|
123
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Injector } from "@angular/core";
|
|
2
|
-
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from "@angular/common/http";
|
|
3
|
-
import { Observable } from "rxjs";
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AuthorizationInterceptor implements HttpInterceptor {
|
|
6
|
-
private injector;
|
|
7
|
-
constructor(injector: Injector);
|
|
8
|
-
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthorizationInterceptor, never>;
|
|
10
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthorizationInterceptor>;
|
|
11
|
-
}
|
|
1
|
+
import { Injector } from "@angular/core";
|
|
2
|
+
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from "@angular/common/http";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AuthorizationInterceptor implements HttpInterceptor {
|
|
6
|
+
private injector;
|
|
7
|
+
constructor(injector: Injector);
|
|
8
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthorizationInterceptor, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthorizationInterceptor>;
|
|
11
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { OnInit } from "@angular/core";
|
|
2
|
-
import { AuthenticationService } from "./authentication.service";
|
|
3
|
-
import { UntypedFormBuilder, UntypedFormGroup } from "@angular/forms";
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class DirectLoginComponent implements OnInit {
|
|
6
|
-
private _authenticationService;
|
|
7
|
-
private _formBuilder;
|
|
8
|
-
_loginForm: UntypedFormGroup;
|
|
9
|
-
_errorMsg: string;
|
|
10
|
-
constructor(_authenticationService: AuthenticationService, _formBuilder: UntypedFormBuilder);
|
|
11
|
-
/**
|
|
12
|
-
* Initializes the authentication form.
|
|
13
|
-
*/
|
|
14
|
-
ngOnInit(): void;
|
|
15
|
-
/**
|
|
16
|
-
* A function to submit the login form the the {@link UserService}.
|
|
17
|
-
*/
|
|
18
|
-
login(): void;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DirectLoginComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DirectLoginComponent, "hci-login-form", never, {}, {}, never, never, false, never>;
|
|
21
|
-
}
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { AuthenticationService } from "./authentication.service";
|
|
3
|
+
import { UntypedFormBuilder, UntypedFormGroup } from "@angular/forms";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DirectLoginComponent implements OnInit {
|
|
6
|
+
private _authenticationService;
|
|
7
|
+
private _formBuilder;
|
|
8
|
+
_loginForm: UntypedFormGroup;
|
|
9
|
+
_errorMsg: string;
|
|
10
|
+
constructor(_authenticationService: AuthenticationService, _formBuilder: UntypedFormBuilder);
|
|
11
|
+
/**
|
|
12
|
+
* Initializes the authentication form.
|
|
13
|
+
*/
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
/**
|
|
16
|
+
* A function to submit the login form the the {@link UserService}.
|
|
17
|
+
*/
|
|
18
|
+
login(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DirectLoginComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DirectLoginComponent, "hci-login-form", never, {}, {}, never, never, false, never>;
|
|
21
|
+
}
|