oip-common 0.0.11 → 0.0.13
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/oip-common.mjs +195 -179
- package/fesm2022/oip-common.mjs.map +1 -1
- package/index.d.ts +12 -66
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { MessageService, ToastMessageOptions, MenuItem, SelectItem, Confirmation
|
|
|
4
4
|
import { ActivatedRoute, QueryParamsHandling, IsActiveMatchOptions, Params, Router, UrlTree } from '@angular/router';
|
|
5
5
|
import { TranslateService } from '@ngx-translate/core';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
|
-
import { Subject,
|
|
8
|
-
import {
|
|
7
|
+
import { Subject, Observable, Subscription } from 'rxjs';
|
|
8
|
+
import { LoginResponse, AuthOptions, AbstractSecurityStorage, StsConfigHttpLoader } from 'angular-auth-oidc-client';
|
|
9
9
|
import { ContextMenu } from 'primeng/contextmenu';
|
|
10
10
|
import { PrimeNG } from 'primeng/config';
|
|
11
11
|
import { HttpInterceptorFn, HttpClient as HttpClient$1 } from '@angular/common/http';
|
|
@@ -315,70 +315,16 @@ declare class LayoutService {
|
|
|
315
315
|
static ɵprov: i0.ɵɵInjectableDeclaration<LayoutService>;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
*/
|
|
329
|
-
private readonly publicEventsService;
|
|
330
|
-
/**
|
|
331
|
-
* Stores the latest login response from checkAuth().
|
|
332
|
-
*/
|
|
333
|
-
loginResponse: BehaviorSubject<LoginResponse>;
|
|
334
|
-
/**
|
|
335
|
-
* Stores the decoded access token payload.
|
|
336
|
-
*/
|
|
337
|
-
payload: BehaviorSubject<any>;
|
|
338
|
-
/**
|
|
339
|
-
* Stores user-specific data from the login response.
|
|
340
|
-
*/
|
|
341
|
-
userData: any;
|
|
342
|
-
/**
|
|
343
|
-
* Initializes service and subscribes to authentication events.
|
|
344
|
-
* When a 'NewAuthenticationResult' event is received, the `auth` method is called.
|
|
345
|
-
*/
|
|
346
|
-
constructor();
|
|
347
|
-
/**
|
|
348
|
-
* Returns the ID token for the sign-in.
|
|
349
|
-
* @returns A string with the id token.
|
|
350
|
-
*/
|
|
351
|
-
getAccessToken(): Observable<string>;
|
|
352
|
-
/**
|
|
353
|
-
* Indicates whether the current user has the 'admin' role.
|
|
354
|
-
*
|
|
355
|
-
* @returns {boolean} True if the user is an admin, false otherwise.
|
|
356
|
-
*/
|
|
357
|
-
get isAdmin(): boolean;
|
|
358
|
-
/**
|
|
359
|
-
* Initiates authentication check and updates login response, user data,
|
|
360
|
-
* and decoded token payload if authenticated.
|
|
361
|
-
*/
|
|
362
|
-
auth(): void;
|
|
363
|
-
/**
|
|
364
|
-
* Performs logout and clears the local token payload.
|
|
365
|
-
*
|
|
366
|
-
* @param {string} [configId] Optional configuration ID for logout.
|
|
367
|
-
* @param {LogoutAuthOptions} [logoutAuthOptions] Optional logout options.
|
|
368
|
-
*/
|
|
369
|
-
logout(configId?: string, logoutAuthOptions?: LogoutAuthOptions): void;
|
|
370
|
-
/**
|
|
371
|
-
* Completes the BehaviorSubjects when the service is destroyed to avoid memory leaks.
|
|
372
|
-
*/
|
|
373
|
-
ngOnDestroy(): void;
|
|
374
|
-
/**
|
|
375
|
-
* Checks whether the current access token is expired based on the 'exp' claim.
|
|
376
|
-
*
|
|
377
|
-
* @returns {Observable<boolean>} Observable that emits true if the token is expired.
|
|
378
|
-
*/
|
|
379
|
-
isTokenExpired(): Observable<boolean>;
|
|
380
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SecurityService, never>;
|
|
381
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SecurityService>;
|
|
318
|
+
declare abstract class SecurityService {
|
|
319
|
+
abstract auth(): void;
|
|
320
|
+
abstract logout(): void;
|
|
321
|
+
abstract isAuthenticated(): Observable<boolean>;
|
|
322
|
+
abstract getAccessToken(): Observable<string>;
|
|
323
|
+
abstract isTokenExpired(): Observable<boolean>;
|
|
324
|
+
abstract getCurrentUser(): any;
|
|
325
|
+
abstract forceRefreshSession(): Observable<LoginResponse>;
|
|
326
|
+
abstract isAdmin(): boolean;
|
|
327
|
+
abstract authorize(configId?: string, authOptions?: AuthOptions): void;
|
|
382
328
|
}
|
|
383
329
|
|
|
384
330
|
/**
|