@masterteam/gateway-auth 0.0.17 → 0.0.19
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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpContextToken, HttpInterceptorFn, HttpRequest } from '@angular/common/http';
|
|
1
|
+
import { HttpClient, HttpContextToken, HttpInterceptorFn, HttpRequest } from '@angular/common/http';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { InjectionToken, OnInit } from '@angular/core';
|
|
4
4
|
import { StateContext } from '@ngxs/store';
|
|
@@ -238,6 +238,9 @@ declare function resolveApiDateValue(value?: GatewayApiDateValue | null): string
|
|
|
238
238
|
declare function mapGatewayTokens(tokens: GatewayAuthTokens | GatewayRefreshData): GatewayMappedTokens;
|
|
239
239
|
declare function resolveAccessTokenRefreshSkewMs(skewMs?: number | null): number;
|
|
240
240
|
declare function resolveApplicationCodeOption(applicationCode?: string | (() => string | null | undefined) | null): string | null;
|
|
241
|
+
declare function buildApplicationContextUrl(applicationApiBaseUrl: string | null | undefined): string | null;
|
|
242
|
+
declare function clearApplicationContextCache(applicationApiBaseUrl?: string | null): void;
|
|
243
|
+
declare function fetchApplicationContextCode(http: HttpClient, applicationApiBaseUrl: string | null | undefined): Promise<string | null>;
|
|
241
244
|
declare function resolveGatewayDeviceToken(deviceToken?: GatewayDeviceTokenOption | null): string;
|
|
242
245
|
declare function withGatewayAuthNgswBypass(url: string): string;
|
|
243
246
|
declare function readPersistedGatewayAuthTokens(): GatewayAuthTokens | null;
|
|
@@ -316,6 +319,7 @@ interface AuthStateModel {
|
|
|
316
319
|
applicationsLoading: boolean;
|
|
317
320
|
appSessions: Record<string, AppSession>;
|
|
318
321
|
appLaunchLoading: Record<string, boolean>;
|
|
322
|
+
activeApplicationCode: string | null;
|
|
319
323
|
}
|
|
320
324
|
declare const AUTH_STATE_DEFAULTS: AuthStateModel;
|
|
321
325
|
declare function sanitizePersistedAuthState(obj: Partial<AuthStateModel> | null): {
|
|
@@ -332,6 +336,7 @@ declare function sanitizePersistedAuthState(obj: Partial<AuthStateModel> | null)
|
|
|
332
336
|
applicationsLoading: boolean;
|
|
333
337
|
appSessions: Record<string, GatewayAppSession>;
|
|
334
338
|
appLaunchLoading: {};
|
|
339
|
+
activeApplicationCode: string | null;
|
|
335
340
|
user: User | null;
|
|
336
341
|
token: string | null;
|
|
337
342
|
refreshToken: string | null;
|
|
@@ -505,7 +510,9 @@ declare class GatewayAuthState {
|
|
|
505
510
|
static applicationsLoading(state: AuthStateModel): boolean;
|
|
506
511
|
static appSessions(state: AuthStateModel): Record<string, AppSession>;
|
|
507
512
|
static appLaunchLoading(state: AuthStateModel): Record<string, boolean>;
|
|
513
|
+
static activeApplicationCode(state: AuthStateModel): string | null;
|
|
508
514
|
login(ctx: StateContext<AuthStateModel>, action: Login): Observable<unknown>;
|
|
515
|
+
private resolveApplicationCode$;
|
|
509
516
|
verifyMfa(ctx: StateContext<AuthStateModel>, action: VerifyMfa): Observable<unknown>;
|
|
510
517
|
resendMfa(ctx: StateContext<AuthStateModel>): Observable<GatewayResponse<GatewayTwoFactorChallenge> | null>;
|
|
511
518
|
loadSsoProviders(ctx: StateContext<AuthStateModel>): Observable<GatewayResponse<GatewaySsoProvidersData> | null>;
|
|
@@ -565,6 +572,7 @@ declare class GatewayAuthFacade {
|
|
|
565
572
|
readonly applicationsLoading: _angular_core.Signal<boolean>;
|
|
566
573
|
readonly appSessions: _angular_core.Signal<Record<string, _masterteam_gateway_auth.GatewayAppSession>>;
|
|
567
574
|
readonly appLaunchLoading: _angular_core.Signal<Record<string, boolean>>;
|
|
575
|
+
readonly activeApplicationCode: _angular_core.Signal<string | null>;
|
|
568
576
|
readonly hasError: _angular_core.Signal<boolean>;
|
|
569
577
|
readonly isReady: _angular_core.Signal<boolean>;
|
|
570
578
|
readonly userDisplayName: _angular_core.Signal<string>;
|
|
@@ -645,7 +653,7 @@ declare class GatewayLoginPage implements OnInit {
|
|
|
645
653
|
readonly logoUrl: _angular_core.Signal<string | null>;
|
|
646
654
|
readonly defaultLogoUrl: _angular_core.Signal<string | null>;
|
|
647
655
|
readonly backgroundImage: _angular_core.Signal<string | null>;
|
|
648
|
-
readonly formPosition: _angular_core.Signal<"
|
|
656
|
+
readonly formPosition: _angular_core.Signal<"start" | "center" | "end">;
|
|
649
657
|
readonly logoAlignment: _angular_core.Signal<string>;
|
|
650
658
|
readonly formContainerClasses: _angular_core.Signal<"flex flex-col justify-center p-8 w-full items-center" | "flex flex-col justify-center p-8 w-full md:w-1/2 items-center" | "flex flex-col justify-center p-8 w-full md:w-1/2 items-start">;
|
|
651
659
|
constructor();
|
|
@@ -712,5 +720,5 @@ declare class GatewaySsoButtons implements OnInit {
|
|
|
712
720
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GatewaySsoButtons, "mt-gateway-sso-buttons", never, { "dividerLabel": { "alias": "dividerLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
713
721
|
}
|
|
714
722
|
|
|
715
|
-
export { AUTH_STATE_DEFAULTS, ClearAllAppSessions, ClearAppSession, ClearError, ClearPendingMfa, ClearRateLimit, ExchangeSsoCode, GATEWAY_AUTH_ACCESS_TOKEN_REFRESH_SKEW_MS, GATEWAY_AUTH_DEVICE_TOKEN, GATEWAY_AUTH_DEVICE_TOKEN_STORAGE_KEY, GATEWAY_AUTH_ENDPOINTS, GATEWAY_AUTH_NGSW_BYPASS_PARAM, GATEWAY_AUTH_OPTIONS, GATEWAY_AUTH_RETRY_CONTEXT, GATEWAY_RATE_LIMIT_ERROR_CODE, GATEWAY_RATE_LIMIT_STATUS, GatewayAuthFacade, GatewayAuthState, GatewayLoginPage, GatewayMfa, GatewaySsoButtons, GatewaySsoCallback, GatewaySsoSession, LaunchApplication, LoadApplications, LoadSsoProviders, Login, LoginFailure, LoginSuccess, Logout, ResendMfa, SetAppSession, SetApplications, SetRateLimit, StartSso, UpdateAppTokens, UpdateTokens, UpdateUserData, VerifyMfa, buildGatewayUrl, buildSsoStartUrl, createSecureClientState, extractGatewayRateLimitInfo, gatewayAuthInterceptor, getGatewayErrorMessage, hasGatewayTokens, isExpired, isGatewayAuthRequestUrl, mapGatewayTokens, mapGatewayUser, normalizeGatewayBase, readPersistedGatewayAuthTokens, resolveAccessTokenRefreshSkewMs, resolveApiDateValue, resolveApplicationCodeOption, resolveGatewayAuthPath, resolveGatewayDeviceToken, sanitizePersistedAuthState, withGatewayAuthNgswBypass };
|
|
723
|
+
export { AUTH_STATE_DEFAULTS, ClearAllAppSessions, ClearAppSession, ClearError, ClearPendingMfa, ClearRateLimit, ExchangeSsoCode, GATEWAY_AUTH_ACCESS_TOKEN_REFRESH_SKEW_MS, GATEWAY_AUTH_DEVICE_TOKEN, GATEWAY_AUTH_DEVICE_TOKEN_STORAGE_KEY, GATEWAY_AUTH_ENDPOINTS, GATEWAY_AUTH_NGSW_BYPASS_PARAM, GATEWAY_AUTH_OPTIONS, GATEWAY_AUTH_RETRY_CONTEXT, GATEWAY_RATE_LIMIT_ERROR_CODE, GATEWAY_RATE_LIMIT_STATUS, GatewayAuthFacade, GatewayAuthState, GatewayLoginPage, GatewayMfa, GatewaySsoButtons, GatewaySsoCallback, GatewaySsoSession, LaunchApplication, LoadApplications, LoadSsoProviders, Login, LoginFailure, LoginSuccess, Logout, ResendMfa, SetAppSession, SetApplications, SetRateLimit, StartSso, UpdateAppTokens, UpdateTokens, UpdateUserData, VerifyMfa, buildApplicationContextUrl, buildGatewayUrl, buildSsoStartUrl, clearApplicationContextCache, createSecureClientState, extractGatewayRateLimitInfo, fetchApplicationContextCode, gatewayAuthInterceptor, getGatewayErrorMessage, hasGatewayTokens, isExpired, isGatewayAuthRequestUrl, mapGatewayTokens, mapGatewayUser, normalizeGatewayBase, readPersistedGatewayAuthTokens, resolveAccessTokenRefreshSkewMs, resolveApiDateValue, resolveApplicationCodeOption, resolveGatewayAuthPath, resolveGatewayDeviceToken, sanitizePersistedAuthState, withGatewayAuthNgswBypass };
|
|
716
724
|
export type { ApiDateValue, AppSession, ApplicationListItem, AuthLoginData, AuthRateLimit, AuthRateLimitScope, AuthRefreshData, AuthStateModel, AuthTokens, BuildSsoStartUrlOptions, GatewayApiDateValue, GatewayAppSession, GatewayApplicationCodeOption, GatewayApplicationContextData, GatewayApplicationLaunchData, GatewayApplicationListItem, GatewayApplicationsData, GatewayAuthHookResult, GatewayAuthOptions, GatewayAuthTokens, GatewayDeviceTokenOption, GatewayExternalTokenExchangeRequest, GatewayLoginLanguageOption, GatewayLoginPageOptions, GatewayLoginRequest, GatewayLoginResponse, GatewayLogoutRequest, GatewayMappedTokens, GatewayMappedUser, GatewayNafathStartData, GatewayNafathStartRequest, GatewayNafathStatusData, GatewayNafathStatusRequest, GatewayPlatform, GatewayRateLimitInfo, GatewayRefreshData, GatewayRefreshRequest, GatewayResendMfaRequest, GatewayResponse, GatewaySsoExchangeRequest, GatewaySsoFlow, GatewaySsoProtocol, GatewaySsoProvider, GatewaySsoProvidersData, GatewayTwoFactorChallenge, GatewayUserDetails, GatewayVerifyMfaRequest, LoginRequest, Response, SsoProvider, TwoFactorChallenge, User, UserDetails };
|