@igo2/auth 1.15.3 → 16.0.0-rc.0

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.
Files changed (76) hide show
  1. package/{esm2020 → esm2022}/igo2-auth.mjs +4 -4
  2. package/esm2022/lib/auth-form/auth-facebook.component.mjs +67 -0
  3. package/esm2022/lib/auth-form/auth-form.component.mjs +286 -0
  4. package/esm2022/lib/auth-form/auth-google.component.mjs +108 -0
  5. package/esm2022/lib/auth-form/auth-intern.component.mjs +134 -0
  6. package/esm2022/lib/auth-form/auth-microsoft.component.mjs +107 -0
  7. package/esm2022/lib/auth-form/auth-microsoftb2c.component.mjs +105 -0
  8. package/{esm2020 → esm2022}/lib/auth-form/index.mjs +5 -5
  9. package/{esm2020 → esm2022}/lib/auth-routing.module.mjs +24 -24
  10. package/{esm2020 → esm2022}/lib/auth.module.mjs +91 -91
  11. package/esm2022/lib/shared/admin.guard.mjs +39 -0
  12. package/esm2022/lib/shared/auth-microsoft.provider.mjs +86 -0
  13. package/esm2022/lib/shared/auth-msalBroadcastServiceb2c.service.mjs +47 -0
  14. package/esm2022/lib/shared/auth-msalServiceb2c.service..mjs +85 -0
  15. package/esm2022/lib/shared/auth.guard.mjs +38 -0
  16. package/esm2022/lib/shared/auth.interceptor.mjs +164 -0
  17. package/{esm2020 → esm2022}/lib/shared/auth.interface.mjs +2 -2
  18. package/esm2022/lib/shared/auth.service.mjs +168 -0
  19. package/esm2022/lib/shared/logged.guard.mjs +38 -0
  20. package/esm2022/lib/shared/profils.guard.mjs +43 -0
  21. package/esm2022/lib/shared/protected.directive.mjs +20 -0
  22. package/{esm2020 → esm2022}/lib/shared/storage.interface.mjs +1 -1
  23. package/esm2022/lib/shared/storage.service.mjs +99 -0
  24. package/esm2022/lib/shared/token.service.mjs +48 -0
  25. package/{esm2020 → esm2022}/public_api.mjs +18 -18
  26. package/{fesm2020 → fesm2022}/igo2-auth.mjs +1573 -1477
  27. package/fesm2022/igo2-auth.mjs.map +1 -0
  28. package/index.d.ts +5 -5
  29. package/lib/auth-form/auth-facebook.component.d.ts +18 -18
  30. package/lib/auth-form/auth-form.component.d.ts +42 -42
  31. package/lib/auth-form/auth-google.component.d.ts +24 -24
  32. package/lib/auth-form/auth-intern.component.d.ts +21 -21
  33. package/lib/auth-form/auth-microsoft.component.d.ts +23 -23
  34. package/lib/auth-form/auth-microsoftb2c.component.d.ts +23 -23
  35. package/lib/auth-form/index.d.ts +4 -4
  36. package/lib/auth-routing.module.d.ts +7 -7
  37. package/lib/auth.module.d.ts +23 -23
  38. package/lib/shared/admin.guard.d.ts +13 -13
  39. package/lib/shared/auth-microsoft.provider.d.ts +30 -30
  40. package/lib/shared/auth-msalBroadcastServiceb2c.service.d.ts +15 -15
  41. package/lib/shared/auth-msalServiceb2c.service..d.ts +33 -33
  42. package/lib/shared/auth.guard.d.ts +13 -13
  43. package/lib/shared/auth.interceptor.d.ts +24 -24
  44. package/lib/shared/auth.interface.d.ts +99 -99
  45. package/lib/shared/auth.service.d.ts +44 -44
  46. package/lib/shared/logged.guard.d.ts +13 -13
  47. package/lib/shared/profils.guard.d.ts +13 -13
  48. package/lib/shared/protected.directive.d.ts +8 -8
  49. package/lib/shared/storage.interface.d.ts +4 -4
  50. package/lib/shared/storage.service.d.ts +17 -18
  51. package/lib/shared/token.service.d.ts +15 -15
  52. package/locale/en.auth.json +28 -0
  53. package/locale/fr.auth.json +32 -0
  54. package/package.json +18 -25
  55. package/public_api.d.ts +15 -15
  56. package/esm2020/lib/auth-form/auth-facebook.component.mjs +0 -61
  57. package/esm2020/lib/auth-form/auth-form.component.mjs +0 -277
  58. package/esm2020/lib/auth-form/auth-google.component.mjs +0 -99
  59. package/esm2020/lib/auth-form/auth-intern.component.mjs +0 -119
  60. package/esm2020/lib/auth-form/auth-microsoft.component.mjs +0 -94
  61. package/esm2020/lib/auth-form/auth-microsoftb2c.component.mjs +0 -93
  62. package/esm2020/lib/shared/admin.guard.mjs +0 -33
  63. package/esm2020/lib/shared/auth-microsoft.provider.mjs +0 -84
  64. package/esm2020/lib/shared/auth-msalBroadcastServiceb2c.service.mjs +0 -38
  65. package/esm2020/lib/shared/auth-msalServiceb2c.service..mjs +0 -80
  66. package/esm2020/lib/shared/auth.guard.mjs +0 -32
  67. package/esm2020/lib/shared/auth.interceptor.mjs +0 -155
  68. package/esm2020/lib/shared/auth.service.mjs +0 -158
  69. package/esm2020/lib/shared/logged.guard.mjs +0 -32
  70. package/esm2020/lib/shared/profils.guard.mjs +0 -37
  71. package/esm2020/lib/shared/protected.directive.mjs +0 -19
  72. package/esm2020/lib/shared/storage.service.mjs +0 -91
  73. package/esm2020/lib/shared/token.service.mjs +0 -47
  74. package/fesm2015/igo2-auth.mjs +0 -1655
  75. package/fesm2015/igo2-auth.mjs.map +0 -1
  76. package/fesm2020/igo2-auth.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- export * from './auth-form.component';
2
- export * from './auth-intern.component';
3
- export * from './auth-facebook.component';
4
- export * from './auth-google.component';
1
+ export * from './auth-form.component';
2
+ export * from './auth-intern.component';
3
+ export * from './auth-facebook.component';
4
+ export * from './auth-google.component';
@@ -1,7 +1,7 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@angular/router";
3
- export declare class AuthRoutingModule {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthRoutingModule, never>;
5
- static ɵmod: i0.ɵɵNgModuleDeclaration<AuthRoutingModule, never, [typeof i1.RouterModule], [typeof i1.RouterModule]>;
6
- static ɵinj: i0.ɵɵInjectorDeclaration<AuthRoutingModule>;
7
- }
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/router";
3
+ export declare class AuthRoutingModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthRoutingModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AuthRoutingModule, never, [typeof i1.RouterModule], [typeof i1.RouterModule]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<AuthRoutingModule>;
7
+ }
@@ -1,23 +1,23 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "./auth-form/auth-form.component";
4
- import * as i2 from "./auth-form/auth-google.component";
5
- import * as i3 from "./auth-form/auth-intern.component";
6
- import * as i4 from "./auth-form/auth-facebook.component";
7
- import * as i5 from "./auth-form/auth-microsoft.component";
8
- import * as i6 from "./auth-form/auth-microsoftb2c.component";
9
- import * as i7 from "./shared/protected.directive";
10
- import * as i8 from "@angular/common";
11
- import * as i9 from "@angular/forms";
12
- import * as i10 from "@angular/material/form-field";
13
- import * as i11 from "@angular/material/input";
14
- import * as i12 from "@angular/material/icon";
15
- import * as i13 from "@angular/material/button";
16
- import * as i14 from "@igo2/core";
17
- import * as i15 from "@azure/msal-angular";
18
- export declare class IgoAuthModule {
19
- static forRoot(): ModuleWithProviders<IgoAuthModule>;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<IgoAuthModule, never>;
21
- static ɵmod: i0.ɵɵNgModuleDeclaration<IgoAuthModule, [typeof i1.AuthFormComponent, typeof i2.AuthGoogleComponent, typeof i3.AuthInternComponent, typeof i4.AuthFacebookComponent, typeof i5.AuthMicrosoftComponent, typeof i6.AuthMicrosoftb2cComponent, typeof i7.ProtectedDirective], [typeof i8.CommonModule, typeof i9.ReactiveFormsModule, typeof i10.MatFormFieldModule, typeof i11.MatInputModule, typeof i12.MatIconModule, typeof i13.MatButtonModule, typeof i14.IgoLanguageModule, typeof i15.MsalModule], [typeof i1.AuthFormComponent, typeof i7.ProtectedDirective]>;
22
- static ɵinj: i0.ɵɵInjectorDeclaration<IgoAuthModule>;
23
- }
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./auth-form/auth-form.component";
4
+ import * as i2 from "./auth-form/auth-google.component";
5
+ import * as i3 from "./auth-form/auth-intern.component";
6
+ import * as i4 from "./auth-form/auth-facebook.component";
7
+ import * as i5 from "./auth-form/auth-microsoft.component";
8
+ import * as i6 from "./auth-form/auth-microsoftb2c.component";
9
+ import * as i7 from "./shared/protected.directive";
10
+ import * as i8 from "@angular/common";
11
+ import * as i9 from "@angular/forms";
12
+ import * as i10 from "@angular/material/form-field";
13
+ import * as i11 from "@angular/material/input";
14
+ import * as i12 from "@angular/material/icon";
15
+ import * as i13 from "@angular/material/button";
16
+ import * as i14 from "@igo2/core";
17
+ import * as i15 from "@azure/msal-angular";
18
+ export declare class IgoAuthModule {
19
+ static forRoot(): ModuleWithProviders<IgoAuthModule>;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<IgoAuthModule, never>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<IgoAuthModule, [typeof i1.AuthFormComponent, typeof i2.AuthGoogleComponent, typeof i3.AuthInternComponent, typeof i4.AuthFacebookComponent, typeof i5.AuthMicrosoftComponent, typeof i6.AuthMicrosoftb2cComponent, typeof i7.ProtectedDirective], [typeof i8.CommonModule, typeof i9.ReactiveFormsModule, typeof i10.MatFormFieldModule, typeof i11.MatInputModule, typeof i12.MatIconModule, typeof i13.MatButtonModule, typeof i14.IgoLanguageModule, typeof i15.MsalModule], [typeof i1.AuthFormComponent, typeof i7.ProtectedDirective]>;
22
+ static ɵinj: i0.ɵɵInjectorDeclaration<IgoAuthModule>;
23
+ }
@@ -1,13 +1,13 @@
1
- import { CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
2
- import { ConfigService } from '@igo2/core';
3
- import { AuthService } from './auth.service';
4
- import * as i0 from "@angular/core";
5
- export declare class AdminGuard implements CanActivate {
6
- private authService;
7
- private config;
8
- private router;
9
- constructor(authService: AuthService, config: ConfigService, router: Router);
10
- canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<AdminGuard, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<AdminGuard>;
13
- }
1
+ import { Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
2
+ import { ConfigService } from '@igo2/core';
3
+ import { AuthService } from './auth.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AdminGuard {
6
+ private authService;
7
+ private config;
8
+ private router;
9
+ constructor(authService: AuthService, config: ConfigService, router: Router);
10
+ canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdminGuard, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<AdminGuard>;
13
+ }
@@ -1,30 +1,30 @@
1
- import { MsalService } from '@azure/msal-angular';
2
- import { PublicClientApplication } from '@azure/msal-browser';
3
- import { ConfigService } from '@igo2/core';
4
- import { MSPMsalGuardConfiguration } from './auth.interface';
5
- import { MsalServiceb2c } from './auth-msalServiceb2c.service.';
6
- export declare function MSALConfigFactory(config: ConfigService): PublicClientApplication;
7
- export declare function MSALConfigFactoryb2c(config: ConfigService): PublicClientApplication;
8
- export declare function MSALAngularConfigFactory(config: ConfigService): MSPMsalGuardConfiguration;
9
- export declare function MSALAngularConfigFactoryb2c(config: ConfigService): MSPMsalGuardConfiguration;
10
- export declare function provideAuthMicrosoft(type?: string): (typeof MsalServiceb2c | {
11
- provide: import("@angular/core").InjectionToken<string>;
12
- useFactory: typeof MSALConfigFactoryb2c;
13
- deps: (typeof ConfigService)[];
14
- multi?: undefined;
15
- } | {
16
- provide: import("@angular/core").InjectionToken<string>;
17
- useFactory: typeof MSALAngularConfigFactoryb2c;
18
- deps: (typeof ConfigService)[];
19
- multi: boolean;
20
- })[] | (typeof MsalService | {
21
- provide: import("@angular/core").InjectionToken<string>;
22
- useFactory: typeof MSALConfigFactory;
23
- deps: (typeof ConfigService)[];
24
- multi?: undefined;
25
- } | {
26
- provide: import("@angular/core").InjectionToken<string>;
27
- useFactory: typeof MSALAngularConfigFactory;
28
- deps: (typeof ConfigService)[];
29
- multi: boolean;
30
- })[];
1
+ import { MsalService } from '@azure/msal-angular';
2
+ import { PublicClientApplication } from '@azure/msal-browser';
3
+ import { ConfigService } from '@igo2/core';
4
+ import { MSPMsalGuardConfiguration } from './auth.interface';
5
+ import { MsalServiceb2c } from './auth-msalServiceb2c.service.';
6
+ export declare function MSALConfigFactory(config: ConfigService): PublicClientApplication;
7
+ export declare function MSALConfigFactoryb2c(config: ConfigService): PublicClientApplication;
8
+ export declare function MSALAngularConfigFactory(config: ConfigService): MSPMsalGuardConfiguration;
9
+ export declare function MSALAngularConfigFactoryb2c(config: ConfigService): MSPMsalGuardConfiguration;
10
+ export declare function provideAuthMicrosoft(type?: string): (typeof MsalServiceb2c | {
11
+ provide: import("@angular/core").InjectionToken<string>;
12
+ useFactory: typeof MSALConfigFactoryb2c;
13
+ deps: (typeof ConfigService)[];
14
+ multi?: undefined;
15
+ } | {
16
+ provide: import("@angular/core").InjectionToken<string>;
17
+ useFactory: typeof MSALAngularConfigFactoryb2c;
18
+ deps: (typeof ConfigService)[];
19
+ multi: boolean;
20
+ })[] | (typeof MsalService | {
21
+ provide: import("@angular/core").InjectionToken<string>;
22
+ useFactory: typeof MSALConfigFactory;
23
+ deps: (typeof ConfigService)[];
24
+ multi?: undefined;
25
+ } | {
26
+ provide: import("@angular/core").InjectionToken<string>;
27
+ useFactory: typeof MSALAngularConfigFactory;
28
+ deps: (typeof ConfigService)[];
29
+ multi: boolean;
30
+ })[];
@@ -1,15 +1,15 @@
1
- import { Observable } from 'rxjs';
2
- import { EventMessage, IPublicClientApplication, InteractionStatus } from '@azure/msal-browser';
3
- import { MsalServiceb2c } from './auth-msalServiceb2c.service.';
4
- import * as i0 from "@angular/core";
5
- export declare class MsalBroadcastServiceb2c {
6
- private msalInstance;
7
- private authService;
8
- private _msalSubject;
9
- msalSubject$: Observable<EventMessage>;
10
- private _inProgress;
11
- inProgress$: Observable<InteractionStatus>;
12
- constructor(msalInstance: IPublicClientApplication, authService: MsalServiceb2c);
13
- static ɵfac: i0.ɵɵFactoryDeclaration<MsalBroadcastServiceb2c, never>;
14
- static ɵprov: i0.ɵɵInjectableDeclaration<MsalBroadcastServiceb2c>;
15
- }
1
+ import { Observable } from 'rxjs';
2
+ import { EventMessage, IPublicClientApplication, InteractionStatus } from '@azure/msal-browser';
3
+ import { MsalServiceb2c } from './auth-msalServiceb2c.service.';
4
+ import * as i0 from "@angular/core";
5
+ export declare class MsalBroadcastServiceb2c {
6
+ private msalInstance;
7
+ private authService;
8
+ private _msalSubject;
9
+ msalSubject$: Observable<EventMessage>;
10
+ private _inProgress;
11
+ inProgress$: Observable<InteractionStatus>;
12
+ constructor(msalInstance: IPublicClientApplication, authService: MsalServiceb2c);
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<MsalBroadcastServiceb2c, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<MsalBroadcastServiceb2c>;
15
+ }
@@ -1,33 +1,33 @@
1
- import { Location } from '@angular/common';
2
- import { IPublicClientApplication, EndSessionRequest, EndSessionPopupRequest, AuthenticationResult, RedirectRequest, SilentRequest, PopupRequest, SsoSilentRequest, Logger } from '@azure/msal-browser';
3
- import { Observable } from 'rxjs';
4
- import { IMsalService } from '@azure/msal-angular';
5
- import * as i0 from "@angular/core";
6
- export declare class MsalServiceb2c implements IMsalService {
7
- instance: IPublicClientApplication;
8
- private location;
9
- private redirectHash;
10
- private logger;
11
- private name;
12
- private version;
13
- constructor(instance: IPublicClientApplication, location: Location);
14
- initialize(): Observable<void>;
15
- acquireTokenPopup(request: PopupRequest): Observable<AuthenticationResult>;
16
- acquireTokenRedirect(request: RedirectRequest): Observable<void>;
17
- acquireTokenSilent(silentRequest: SilentRequest): Observable<AuthenticationResult>;
18
- handleRedirectObservable(hash?: string): Observable<AuthenticationResult>;
19
- loginPopup(request?: PopupRequest): Observable<AuthenticationResult>;
20
- loginRedirect(request?: RedirectRequest): Observable<void>;
21
- logout(logoutRequest?: EndSessionRequest): Observable<void>;
22
- logoutRedirect(logoutRequest?: EndSessionRequest): Observable<void>;
23
- logoutPopup(logoutRequest?: EndSessionPopupRequest): Observable<void>;
24
- ssoSilent(request: SsoSilentRequest): Observable<AuthenticationResult>;
25
- /**
26
- * Gets logger for msal-angular.
27
- * If no logger set, returns logger instance created with same options as msal-browser
28
- */
29
- getLogger(): Logger;
30
- setLogger(logger: Logger): void;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<MsalServiceb2c, never>;
32
- static ɵprov: i0.ɵɵInjectableDeclaration<MsalServiceb2c>;
33
- }
1
+ import { Location } from '@angular/common';
2
+ import { IPublicClientApplication, EndSessionRequest, EndSessionPopupRequest, AuthenticationResult, RedirectRequest, SilentRequest, PopupRequest, SsoSilentRequest, Logger } from '@azure/msal-browser';
3
+ import { Observable } from 'rxjs';
4
+ import { IMsalService } from '@azure/msal-angular';
5
+ import * as i0 from "@angular/core";
6
+ export declare class MsalServiceb2c implements IMsalService {
7
+ instance: IPublicClientApplication;
8
+ private location;
9
+ private redirectHash;
10
+ private logger;
11
+ private name;
12
+ private version;
13
+ constructor(instance: IPublicClientApplication, location: Location);
14
+ initialize(): Observable<void>;
15
+ acquireTokenPopup(request: PopupRequest): Observable<AuthenticationResult>;
16
+ acquireTokenRedirect(request: RedirectRequest): Observable<void>;
17
+ acquireTokenSilent(silentRequest: SilentRequest): Observable<AuthenticationResult>;
18
+ handleRedirectObservable(hash?: string): Observable<AuthenticationResult>;
19
+ loginPopup(request?: PopupRequest): Observable<AuthenticationResult>;
20
+ loginRedirect(request?: RedirectRequest): Observable<void>;
21
+ logout(logoutRequest?: EndSessionRequest): Observable<void>;
22
+ logoutRedirect(logoutRequest?: EndSessionRequest): Observable<void>;
23
+ logoutPopup(logoutRequest?: EndSessionPopupRequest): Observable<void>;
24
+ ssoSilent(request: SsoSilentRequest): Observable<AuthenticationResult>;
25
+ /**
26
+ * Gets logger for msal-angular.
27
+ * If no logger set, returns logger instance created with same options as msal-browser
28
+ */
29
+ getLogger(): Logger;
30
+ setLogger(logger: Logger): void;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<MsalServiceb2c, never>;
32
+ static ɵprov: i0.ɵɵInjectableDeclaration<MsalServiceb2c>;
33
+ }
@@ -1,13 +1,13 @@
1
- import { CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
2
- import { ConfigService } from '@igo2/core';
3
- import { AuthService } from './auth.service';
4
- import * as i0 from "@angular/core";
5
- export declare class AuthGuard implements CanActivate {
6
- private authService;
7
- private config;
8
- private router;
9
- constructor(authService: AuthService, config: ConfigService, router: Router);
10
- canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuard, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuard>;
13
- }
1
+ import { Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
2
+ import { ConfigService } from '@igo2/core';
3
+ import { AuthService } from './auth.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AuthGuard {
6
+ private authService;
7
+ private config;
8
+ private router;
9
+ constructor(authService: AuthService, config: ConfigService, router: Router);
10
+ canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuard, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuard>;
13
+ }
@@ -1,24 +1,24 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';
3
- import { Observable } from 'rxjs';
4
- import { ConfigService } from '@igo2/core';
5
- import { TokenService } from './token.service';
6
- import * as i0 from "@angular/core";
7
- export declare class AuthInterceptor implements HttpInterceptor {
8
- private config;
9
- private tokenService;
10
- private http;
11
- private refreshInProgress;
12
- private get trustHosts();
13
- private get hostsWithCredentials();
14
- private get hostsWithAuthByKey();
15
- constructor(config: ConfigService, tokenService: TokenService, http: HttpClient);
16
- intercept(originalReq: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
17
- interceptXhr(xhr: any, url: string): boolean;
18
- alterUrlWithKeyAuth(url: string): string;
19
- private handleHostsWithCredentials;
20
- private handleHostsAuthByKey;
21
- refreshToken(): import("rxjs").Subscription;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthInterceptor, never>;
23
- static ɵprov: i0.ɵɵInjectableDeclaration<AuthInterceptor>;
24
- }
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';
3
+ import { Observable } from 'rxjs';
4
+ import { ConfigService } from '@igo2/core';
5
+ import { TokenService } from './token.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class AuthInterceptor implements HttpInterceptor {
8
+ private config;
9
+ private tokenService;
10
+ private http;
11
+ private refreshInProgress;
12
+ private trustHosts;
13
+ private hostsWithCredentials;
14
+ private hostsWithAuthByKey;
15
+ constructor(config: ConfigService, tokenService: TokenService, http: HttpClient);
16
+ intercept(originalReq: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
17
+ interceptXhr(xhr: any, url: string): boolean;
18
+ alterUrlWithKeyAuth(url: string): string;
19
+ private handleHostsWithCredentials;
20
+ private handleHostsAuthByKey;
21
+ refreshToken(): import("rxjs").Subscription;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthInterceptor, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthInterceptor>;
24
+ }
@@ -1,99 +1,99 @@
1
- import { BrowserAuthOptions } from '@azure/msal-browser';
2
- import { MsalGuardConfiguration } from '@azure/msal-angular';
3
- export interface AuthInternOptions {
4
- enabled?: boolean;
5
- }
6
- export interface AuthFacebookOptions {
7
- enabled?: boolean;
8
- appId: string;
9
- }
10
- export interface AuthGoogleOptions {
11
- enabled?: boolean;
12
- apiKey: string;
13
- clientId: string;
14
- }
15
- export interface AuthMicrosoftOptions {
16
- enabled?: boolean;
17
- clientId: string;
18
- redirectUri?: string;
19
- authority?: string;
20
- }
21
- export interface AuthMicrosoftb2cOptions {
22
- enabled?: boolean;
23
- browserAuthOptions?: BrowserAuthOptions;
24
- options?: AuthMicrosoftb2cOptionsOptions;
25
- scopes?: string[];
26
- }
27
- export interface AuthMicrosoftb2cOptionsOptions {
28
- names: AuthMicrosoftb2cOptionsNames;
29
- authorities: AuthMicrosoftb2cOptionsAuthorities;
30
- authorityDomain: string[];
31
- }
32
- export interface AuthMicrosoftb2cOptionsNames {
33
- signUpSignIn: string;
34
- forgotPassword: string;
35
- editProfile: string;
36
- }
37
- export interface AuthMicrosoftb2cOptionsAuthorities {
38
- signUpSignIn: AuthMicrosoftb2cOptionsAuthority;
39
- forgotPassword: AuthMicrosoftb2cOptionsAuthority;
40
- editProfile: AuthMicrosoftb2cOptionsAuthority;
41
- }
42
- export interface AuthMicrosoftb2cOptionsAuthority {
43
- authority: string;
44
- }
45
- export interface AuthOptions {
46
- url?: string;
47
- tokenKey: string;
48
- allowAnonymous?: boolean;
49
- loginRoute?: string;
50
- logoutRoute?: string;
51
- homeRoute?: string;
52
- intern?: AuthInternOptions;
53
- facebook?: AuthFacebookOptions;
54
- google?: AuthGoogleOptions;
55
- microsoft?: AuthMicrosoftOptions;
56
- microsoftb2c?: AuthMicrosoftb2cOptions;
57
- trustHosts?: string[];
58
- profilsGuard?: string[];
59
- hostsWithCredentials?: WithCredentialsOptions[];
60
- hostsByKey?: AuthByKeyOptions[];
61
- }
62
- export interface AuthByKeyOptions {
63
- domainRegFilters?: string;
64
- keyProperty?: string;
65
- keyValue?: string;
66
- }
67
- export interface WithCredentialsOptions {
68
- withCredentials?: boolean;
69
- domainRegFilters?: string;
70
- }
71
- export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
72
- type: string;
73
- }
74
- export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
75
- type: string;
76
- }
77
- export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
78
- type: string;
79
- }
80
- export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
81
- type: string;
82
- }
83
- export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
84
- type: string;
85
- }
86
- export interface User {
87
- source?: string;
88
- sourceId?: string;
89
- email?: string;
90
- firstName?: string;
91
- lastName?: string;
92
- locale?: string;
93
- isExpired?: boolean;
94
- admin?: boolean;
95
- defaultContextId?: string;
96
- }
97
- export interface IInfosUser {
98
- tokenId: string;
99
- }
1
+ import { BrowserAuthOptions } from '@azure/msal-browser';
2
+ import { MsalGuardConfiguration } from '@azure/msal-angular';
3
+ export interface AuthInternOptions {
4
+ enabled?: boolean;
5
+ }
6
+ export interface AuthFacebookOptions {
7
+ enabled?: boolean;
8
+ appId: string;
9
+ }
10
+ export interface AuthGoogleOptions {
11
+ enabled?: boolean;
12
+ apiKey: string;
13
+ clientId: string;
14
+ }
15
+ export interface AuthMicrosoftOptions {
16
+ enabled?: boolean;
17
+ clientId: string;
18
+ redirectUri?: string;
19
+ authority?: string;
20
+ }
21
+ export interface AuthMicrosoftb2cOptions {
22
+ enabled?: boolean;
23
+ browserAuthOptions?: BrowserAuthOptions;
24
+ options?: AuthMicrosoftb2cOptionsOptions;
25
+ scopes?: string[];
26
+ }
27
+ export interface AuthMicrosoftb2cOptionsOptions {
28
+ names: AuthMicrosoftb2cOptionsNames;
29
+ authorities: AuthMicrosoftb2cOptionsAuthorities;
30
+ authorityDomain: string[];
31
+ }
32
+ export interface AuthMicrosoftb2cOptionsNames {
33
+ signUpSignIn: string;
34
+ forgotPassword: string;
35
+ editProfile: string;
36
+ }
37
+ export interface AuthMicrosoftb2cOptionsAuthorities {
38
+ signUpSignIn: AuthMicrosoftb2cOptionsAuthority;
39
+ forgotPassword: AuthMicrosoftb2cOptionsAuthority;
40
+ editProfile: AuthMicrosoftb2cOptionsAuthority;
41
+ }
42
+ export interface AuthMicrosoftb2cOptionsAuthority {
43
+ authority: string;
44
+ }
45
+ export interface AuthOptions {
46
+ url?: string;
47
+ tokenKey: string;
48
+ allowAnonymous?: boolean;
49
+ loginRoute?: string;
50
+ logoutRoute?: string;
51
+ homeRoute?: string;
52
+ intern?: AuthInternOptions;
53
+ facebook?: AuthFacebookOptions;
54
+ google?: AuthGoogleOptions;
55
+ microsoft?: AuthMicrosoftOptions;
56
+ microsoftb2c?: AuthMicrosoftb2cOptions;
57
+ trustHosts?: string[];
58
+ profilsGuard?: string[];
59
+ hostsWithCredentials?: WithCredentialsOptions[];
60
+ hostsByKey?: AuthByKeyOptions[];
61
+ }
62
+ export interface AuthByKeyOptions {
63
+ domainRegFilters?: string;
64
+ keyProperty?: string;
65
+ keyValue?: string;
66
+ }
67
+ export interface WithCredentialsOptions {
68
+ withCredentials?: boolean;
69
+ domainRegFilters?: string;
70
+ }
71
+ export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
72
+ type: string;
73
+ }
74
+ export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
75
+ type: string;
76
+ }
77
+ export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
78
+ type: string;
79
+ }
80
+ export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
81
+ type: string;
82
+ }
83
+ export interface MSPMsalGuardConfiguration extends MsalGuardConfiguration {
84
+ type: string;
85
+ }
86
+ export interface User {
87
+ source?: string;
88
+ sourceId?: string;
89
+ email?: string;
90
+ firstName?: string;
91
+ lastName?: string;
92
+ locale?: string;
93
+ isExpired?: boolean;
94
+ admin?: boolean;
95
+ defaultContextId?: string;
96
+ }
97
+ export interface IInfosUser {
98
+ tokenId: string;
99
+ }
@@ -1,44 +1,44 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Router } from '@angular/router';
3
- import { Observable, BehaviorSubject } from 'rxjs';
4
- import { ConfigService, LanguageService, MessageService } from '@igo2/core';
5
- import { User, IInfosUser } from './auth.interface';
6
- import { TokenService } from './token.service';
7
- import * as i0 from "@angular/core";
8
- export declare class AuthService {
9
- private http;
10
- private tokenService;
11
- private config;
12
- private languageService;
13
- private messageService;
14
- private router;
15
- authenticate$: BehaviorSubject<boolean>;
16
- logged$: BehaviorSubject<boolean>;
17
- redirectUrl: string;
18
- languageForce: boolean;
19
- private anonymous;
20
- get hasAuthService(): boolean;
21
- constructor(http: HttpClient, tokenService: TokenService, config: ConfigService, languageService: LanguageService, messageService: MessageService, router: Router);
22
- login(username: string, password: string): Observable<void>;
23
- loginWithToken(token: string, type: string, infosUser?: IInfosUser): Observable<void>;
24
- loginAnonymous(): Observable<boolean>;
25
- refresh(): Observable<void>;
26
- logout(): Observable<boolean>;
27
- isAuthenticated(): boolean;
28
- getToken(): string;
29
- decodeToken(): any;
30
- goToRedirectUrl(): void;
31
- getUserInfo(): Observable<User>;
32
- getProfils(): Observable<{
33
- profils: string[];
34
- }>;
35
- updateUser(user: User): Observable<User>;
36
- private encodePassword;
37
- get logged(): boolean;
38
- get isAnonymous(): boolean;
39
- get authenticated(): boolean;
40
- get isAdmin(): boolean;
41
- private loginCall;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, [null, null, null, null, null, { optional: true; }]>;
43
- static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
44
- }
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Router } from '@angular/router';
3
+ import { Observable, BehaviorSubject } from 'rxjs';
4
+ import { ConfigService, LanguageService, MessageService } from '@igo2/core';
5
+ import { User, IInfosUser } from './auth.interface';
6
+ import { TokenService } from './token.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class AuthService {
9
+ private http;
10
+ private tokenService;
11
+ private config;
12
+ private languageService;
13
+ private messageService;
14
+ private router;
15
+ authenticate$: BehaviorSubject<boolean>;
16
+ logged$: BehaviorSubject<boolean>;
17
+ redirectUrl: string;
18
+ languageForce: boolean;
19
+ private anonymous;
20
+ get hasAuthService(): boolean;
21
+ constructor(http: HttpClient, tokenService: TokenService, config: ConfigService, languageService: LanguageService, messageService: MessageService, router: Router);
22
+ login(username: string, password: string): Observable<void>;
23
+ loginWithToken(token: string, type: string, infosUser?: IInfosUser): Observable<void>;
24
+ loginAnonymous(): Observable<boolean>;
25
+ refresh(): Observable<void>;
26
+ logout(): Observable<boolean>;
27
+ isAuthenticated(): boolean;
28
+ getToken(): string;
29
+ decodeToken(): any;
30
+ goToRedirectUrl(): void;
31
+ getUserInfo(): Observable<User>;
32
+ getProfils(): Observable<{
33
+ profils: string[];
34
+ }>;
35
+ updateUser(user: User): Observable<User>;
36
+ private encodePassword;
37
+ get logged(): boolean;
38
+ get isAnonymous(): boolean;
39
+ get authenticated(): boolean;
40
+ get isAdmin(): boolean;
41
+ private loginCall;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, [null, null, null, null, null, { optional: true; }]>;
43
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
44
+ }