@bymax-one/nest-auth 1.5.9 → 1.5.11
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/CHANGELOG.md +120 -1
- package/README.md +208 -30
- package/dist/observability/index.cjs +166 -0
- package/dist/observability/index.d.cts +83 -0
- package/dist/observability/index.d.ts +83 -0
- package/dist/observability/index.mjs +163 -0
- package/dist/server/index.cjs +3317 -1795
- package/dist/server/index.d.cts +117 -23
- package/dist/server/index.d.ts +117 -23
- package/dist/server/index.mjs +3315 -1797
- package/package.json +33 -2
package/dist/server/index.d.cts
CHANGED
|
@@ -1189,12 +1189,12 @@ interface BymaxAuthModuleOptions {
|
|
|
1189
1189
|
/**
|
|
1190
1190
|
* `Path` attribute for the short-lived `mfa_temp_token` cookie planted
|
|
1191
1191
|
* by the OAuth callback (lib v1.0.7+) and cleared by the MFA challenge
|
|
1192
|
-
* controller. Defaults to
|
|
1193
|
-
*
|
|
1192
|
+
* controller. Defaults to `/auth/mfa`, which does not follow `routePrefix`
|
|
1193
|
+
* — correct for the default prefix with no Nest global prefix.
|
|
1194
1194
|
*
|
|
1195
|
-
* Set this explicitly when the consumer
|
|
1196
|
-
*
|
|
1197
|
-
* construction time. For example, with `setGlobalPrefix('api')` and
|
|
1195
|
+
* Set this explicitly when the consumer changes `routePrefix` or calls
|
|
1196
|
+
* `app.setGlobalPrefix(...)`: the library cannot observe the global
|
|
1197
|
+
* prefix at module construction time. For example, with `setGlobalPrefix('api')` and
|
|
1198
1198
|
* default `routePrefix: 'auth'`, the real challenge URL is
|
|
1199
1199
|
* `/api/auth/mfa/challenge` — but `Path=/auth/mfa` will NOT be sent
|
|
1200
1200
|
* by the browser (RFC 6265 prefix-match). Set this to `'/api/auth/mfa'`
|
|
@@ -5236,21 +5236,21 @@ interface IMembershipRepository {
|
|
|
5236
5236
|
declare class NoOpEmailProvider implements IEmailProvider {
|
|
5237
5237
|
private readonly logger;
|
|
5238
5238
|
/** @inheritdoc */
|
|
5239
|
-
sendPasswordResetToken(_tenantId: string,
|
|
5239
|
+
sendPasswordResetToken(_tenantId: string, _email: string, _token: string, _locale?: string): Promise<void>;
|
|
5240
5240
|
/** @inheritdoc */
|
|
5241
|
-
sendPasswordResetOtp(_tenantId: string,
|
|
5241
|
+
sendPasswordResetOtp(_tenantId: string, _email: string, _otp: string, _locale?: string): Promise<void>;
|
|
5242
5242
|
/** @inheritdoc */
|
|
5243
|
-
sendEmailVerificationOtp(_tenantId: string,
|
|
5243
|
+
sendEmailVerificationOtp(_tenantId: string, _email: string, _otp: string, _locale?: string): Promise<void>;
|
|
5244
5244
|
/** @inheritdoc */
|
|
5245
|
-
sendMfaEnabledNotification(_tenantId: string,
|
|
5245
|
+
sendMfaEnabledNotification(_tenantId: string, _email: string, _locale?: string): Promise<void>;
|
|
5246
5246
|
/** @inheritdoc */
|
|
5247
|
-
sendMfaDisabledNotification(_tenantId: string,
|
|
5247
|
+
sendMfaDisabledNotification(_tenantId: string, _email: string, _locale?: string): Promise<void>;
|
|
5248
5248
|
/** @inheritdoc */
|
|
5249
|
-
sendNewSessionAlert(_tenantId: string,
|
|
5249
|
+
sendNewSessionAlert(_tenantId: string, _email: string, _sessionInfo: SessionAlertInfo, _locale?: string): Promise<void>;
|
|
5250
5250
|
/** @inheritdoc */
|
|
5251
|
-
sendInvitation(_tenantId: string,
|
|
5251
|
+
sendInvitation(_tenantId: string, _email: string, _inviteData: InviteData, _locale?: string): Promise<void>;
|
|
5252
5252
|
/** @inheritdoc */
|
|
5253
|
-
sendWorkspaceInvitation(_tenantId: string,
|
|
5253
|
+
sendWorkspaceInvitation(_tenantId: string, _email: string, _data: WorkspaceInviteData, _locale?: string): Promise<void>;
|
|
5254
5254
|
}
|
|
5255
5255
|
|
|
5256
5256
|
/**
|
|
@@ -9013,6 +9013,55 @@ declare class VerifyOtpDto {
|
|
|
9013
9013
|
tenantId?: string;
|
|
9014
9014
|
}
|
|
9015
9015
|
|
|
9016
|
+
/**
|
|
9017
|
+
* @fileoverview The counts the auth flows keep for whoever publishes metrics, with every label set closed.
|
|
9018
|
+
*
|
|
9019
|
+
* @layer Service
|
|
9020
|
+
*/
|
|
9021
|
+
|
|
9022
|
+
/** The two planes an authentication flow runs on. */
|
|
9023
|
+
declare const AUTH_PLANES: readonly ["dashboard", "platform"];
|
|
9024
|
+
/** What a login attempt ended as. */
|
|
9025
|
+
declare const LOGIN_OUTCOMES: readonly ["success", "invalid_credentials", "locked", "mfa_required", "blocked"];
|
|
9026
|
+
/** What a refresh attempt ended as. */
|
|
9027
|
+
declare const REFRESH_OUTCOMES: readonly ["rotated", "reuse_detected", "expired", "invalid"];
|
|
9028
|
+
/** What an MFA verification ended as. */
|
|
9029
|
+
declare const MFA_OUTCOMES: readonly ["success", "invalid", "locked"];
|
|
9030
|
+
/** What a login attempt ended as, one of {@link LOGIN_OUTCOMES}. */
|
|
9031
|
+
type LoginOutcome = (typeof LOGIN_OUTCOMES)[number];
|
|
9032
|
+
/** What a refresh attempt ended as, one of {@link REFRESH_OUTCOMES}. */
|
|
9033
|
+
type RefreshOutcome = (typeof REFRESH_OUTCOMES)[number];
|
|
9034
|
+
/** What an MFA verification ended as, one of {@link MFA_OUTCOMES}. */
|
|
9035
|
+
type MfaOutcome = (typeof MFA_OUTCOMES)[number];
|
|
9036
|
+
/** A count for each outcome on each plane. */
|
|
9037
|
+
type PlaneCounts<K extends string> = Readonly<Record<AuthPlane, Readonly<Record<K, number>>>>;
|
|
9038
|
+
/**
|
|
9039
|
+
* Counts what the authentication flows do, in plain numbers.
|
|
9040
|
+
*
|
|
9041
|
+
* It exists so that the code that does the work never imports a metrics library: an application that
|
|
9042
|
+
* publishes nothing pays for a few integer increments, and the optional `observability` subpath reads
|
|
9043
|
+
* these numbers when it is scraped. Each count is keyed by a closed set, so no label can grow with the
|
|
9044
|
+
* traffic, and nothing a caller or a host supplied is ever a key.
|
|
9045
|
+
*/
|
|
9046
|
+
declare class AuthMetricsTally {
|
|
9047
|
+
#private;
|
|
9048
|
+
/** A login attempt on `plane` ended as `outcome`. */
|
|
9049
|
+
login(plane: AuthPlane, outcome: LoginOutcome): void;
|
|
9050
|
+
/** A refresh attempt on `plane` ended as `outcome`. */
|
|
9051
|
+
refresh(plane: AuthPlane, outcome: RefreshOutcome): void;
|
|
9052
|
+
/** An MFA verification on `plane` ended as `outcome`. */
|
|
9053
|
+
mfa(plane: AuthPlane, outcome: MfaOutcome): void;
|
|
9054
|
+
/** A run of failures reached the threshold and locked an identifier out. */
|
|
9055
|
+
lockout(): void;
|
|
9056
|
+
/** The counts so far, as copies. */
|
|
9057
|
+
snapshot(): {
|
|
9058
|
+
readonly logins: PlaneCounts<LoginOutcome>;
|
|
9059
|
+
readonly refreshes: PlaneCounts<RefreshOutcome>;
|
|
9060
|
+
readonly mfa: PlaneCounts<MfaOutcome>;
|
|
9061
|
+
readonly lockouts: number;
|
|
9062
|
+
};
|
|
9063
|
+
}
|
|
9064
|
+
|
|
9016
9065
|
/**
|
|
9017
9066
|
* Guards authentication endpoints against brute-force attacks by tracking
|
|
9018
9067
|
* failed attempt counts in Redis.
|
|
@@ -9037,10 +9086,11 @@ declare class VerifyOtpDto {
|
|
|
9037
9086
|
*/
|
|
9038
9087
|
declare class BruteForceService {
|
|
9039
9088
|
private readonly redis;
|
|
9089
|
+
private readonly tally?;
|
|
9040
9090
|
private readonly logger;
|
|
9041
9091
|
private readonly maxAttempts;
|
|
9042
9092
|
private readonly windowSeconds;
|
|
9043
|
-
constructor(redis: AuthRedisService, options: ResolvedOptions);
|
|
9093
|
+
constructor(redis: AuthRedisService, options: ResolvedOptions, tally?: AuthMetricsTally | undefined);
|
|
9044
9094
|
/**
|
|
9045
9095
|
* Returns `true` when the identifier has reached or exceeded the failure threshold.
|
|
9046
9096
|
*
|
|
@@ -9911,8 +9961,7 @@ declare class TokenManagerService {
|
|
|
9911
9961
|
* consumer subscribes to this hook. `userId` says whose account the family belongs to; `ip` and
|
|
9912
9962
|
* `userAgent` are the only description of the party holding the token that should not exist, so
|
|
9913
9963
|
* a report carrying the first and not the second says a compromise happened and gives nothing
|
|
9914
|
-
* to act on.
|
|
9915
|
-
* `reissueTokens` had both values in scope as its own parameters.
|
|
9964
|
+
* to act on.
|
|
9916
9965
|
*
|
|
9917
9966
|
* `sanitizedHeaders` stays empty and that is honest — the rotation path receives the address
|
|
9918
9967
|
* and the agent, never the header map, so there is nothing to sanitize. Inventing one would be
|
|
@@ -10212,6 +10261,20 @@ declare class TokenManagerService {
|
|
|
10212
10261
|
jti: string;
|
|
10213
10262
|
tenantId?: string;
|
|
10214
10263
|
}>;
|
|
10264
|
+
/**
|
|
10265
|
+
* Refuses a temp token whose tenant claim does not fit its plane.
|
|
10266
|
+
*
|
|
10267
|
+
* @param payload - The claims of a token whose signature held.
|
|
10268
|
+
* @throws {@link AuthException} with `MFA_TEMP_TOKEN_INVALID`.
|
|
10269
|
+
*/
|
|
10270
|
+
private assertMfaTempTokenBinding;
|
|
10271
|
+
/**
|
|
10272
|
+
* Refuses a temp token whose Redis entry is gone, names another account, or predates a bulk revocation.
|
|
10273
|
+
*
|
|
10274
|
+
* @param payload - The claims of a token whose signature held.
|
|
10275
|
+
* @throws {@link AuthException} with `MFA_TEMP_TOKEN_INVALID`.
|
|
10276
|
+
*/
|
|
10277
|
+
private assertMfaTempTokenLive;
|
|
10215
10278
|
/**
|
|
10216
10279
|
* Atomically consumes a previously-verified MFA temp token.
|
|
10217
10280
|
*
|
|
@@ -10707,6 +10770,8 @@ declare class AuthService {
|
|
|
10707
10770
|
* refused login into a different refusal, nor a successful one into a failure.
|
|
10708
10771
|
*/
|
|
10709
10772
|
private fireAndForget;
|
|
10773
|
+
/** Writes the event of a password login that reached its end: tokens issued, or an MFA challenge. */
|
|
10774
|
+
private logLogin;
|
|
10710
10775
|
private assertUserNotBlocked;
|
|
10711
10776
|
private sendVerificationOtp;
|
|
10712
10777
|
}
|
|
@@ -11407,8 +11472,7 @@ declare class MfaManagementService {
|
|
|
11407
11472
|
/**
|
|
11408
11473
|
* Tells the account holder their second factor was turned off.
|
|
11409
11474
|
*
|
|
11410
|
-
* @param
|
|
11411
|
-
* @param scope - The plane, account and tenant that changed.
|
|
11475
|
+
* @param kind - The flow that turned the factor off, for the event.
|
|
11412
11476
|
* @param user - The account, read for its address.
|
|
11413
11477
|
*/
|
|
11414
11478
|
private notifyDisabled;
|
|
@@ -11675,6 +11739,39 @@ declare class MfaService {
|
|
|
11675
11739
|
}>;
|
|
11676
11740
|
}
|
|
11677
11741
|
|
|
11742
|
+
/**
|
|
11743
|
+
* Asks the Redis client the module was given whether it answers.
|
|
11744
|
+
*
|
|
11745
|
+
* A `PING` writes nothing and reads nothing a caller owns, so a readiness probe costs the store one round
|
|
11746
|
+
* trip and no data. It lives in the main entry because the client is private to the module; the optional
|
|
11747
|
+
* `observability` subpath wraps it as a health indicator.
|
|
11748
|
+
*
|
|
11749
|
+
* Each probe is bounded: it gives up after {@link PING_TIMEOUT_MS} or when the caller's signal aborts,
|
|
11750
|
+
* whichever is first, so a stalled socket cannot hold a readiness check open. Probes that arrive while a
|
|
11751
|
+
* `PING` is still pending share it, so a store that never answers is asked once, not once per probe. A
|
|
11752
|
+
* `PING` that has outlived the timeout is not shared any longer: the next probe sends a fresh one, so a
|
|
11753
|
+
* command the client never settles cannot keep the readiness check down after the store has recovered, and
|
|
11754
|
+
* at most one `PING` is sent per timeout window.
|
|
11755
|
+
*/
|
|
11756
|
+
declare class AuthHealthProbe {
|
|
11757
|
+
#private;
|
|
11758
|
+
private readonly redis;
|
|
11759
|
+
constructor(redis: {
|
|
11760
|
+
ping(): Promise<string>;
|
|
11761
|
+
});
|
|
11762
|
+
/**
|
|
11763
|
+
* Whether the store answers a `PING` in time.
|
|
11764
|
+
*
|
|
11765
|
+
* @param signal - Aborted when the caller stops waiting; the probe then rejects without waiting longer.
|
|
11766
|
+
* @returns `true` when it answers `PONG`, `false` for any other answer.
|
|
11767
|
+
* @throws When the store cannot be reached, does not answer in time, or the signal aborts; the health
|
|
11768
|
+
* aggregator turns the rejection into a `down` entry.
|
|
11769
|
+
*/
|
|
11770
|
+
ping(signal?: AbortSignal): Promise<boolean>;
|
|
11771
|
+
/** `answer`, or a rejection as soon as `signal` aborts. */
|
|
11772
|
+
private within;
|
|
11773
|
+
}
|
|
11774
|
+
|
|
11678
11775
|
/**
|
|
11679
11776
|
* Manages tenant invitation flows — creating and accepting invitations.
|
|
11680
11777
|
*
|
|
@@ -13101,8 +13198,6 @@ declare class OAuthService {
|
|
|
13101
13198
|
* Issues the MFA temp token for an account that has a second factor.
|
|
13102
13199
|
*
|
|
13103
13200
|
* @param authUser - The account the flow resolved to.
|
|
13104
|
-
* @param provider - The provider name, for the log line.
|
|
13105
|
-
* @param hookResult - The hook's decision, whose action goes in the log line.
|
|
13106
13201
|
* @returns The challenge the controller plants in a cookie or surfaces in the body.
|
|
13107
13202
|
*/
|
|
13108
13203
|
private issueMfaChallenge;
|
|
@@ -13136,7 +13231,6 @@ declare class OAuthService {
|
|
|
13136
13231
|
/**
|
|
13137
13232
|
* Reads and deletes the state record of a flow, in one step so it can be used once.
|
|
13138
13233
|
*
|
|
13139
|
-
* @param provider - The provider named by the callback path, for the log lines.
|
|
13140
13234
|
* @param state - The `state` query value.
|
|
13141
13235
|
* @returns The stored record.
|
|
13142
13236
|
* @throws `AuthException(OAUTH_FAILED)` for a state that is missing, unparseable or malformed.
|
|
@@ -14622,5 +14716,5 @@ declare class WorkspaceInvitationService {
|
|
|
14622
14716
|
private activeWorkspace;
|
|
14623
14717
|
}
|
|
14624
14718
|
|
|
14625
|
-
export { ALLOW_PENDING_WORKSPACE_KEY, ANY_WORKSPACE_MEMBER, API_KEY_MAX_LABEL_LENGTH, API_KEY_MAX_OVERLAP_SECONDS, AUTH_EMAIL_KINDS, AUTH_ERROR_CODES, AUTH_ERROR_MESSAGES, AUTH_ERROR_STATUS, AUTH_SECRET_MIN_LENGTH, AUTH_SECURITY_SCHEMES, AUTH_THROTTLE_CONFIGS, AcceptInvitationDto, AccountStatusService, AllowAllBreachChecker, AllowPendingWorkspace, ApiKeyGuard, ApiKeyScopes, ApiKeyService, AuthException, AuthExceptionFilter, AuthRateLimit, AuthRateLimitGuard, AuthRevocationService, AuthService, AuthTokenVerifierService, Authenticated, BYMAX_AUTH_API_KEY_CLOCK, BYMAX_AUTH_API_KEY_REPOSITORY, BYMAX_AUTH_BREACH_CHECKER, BYMAX_AUTH_EMAIL_PROVIDER, BYMAX_AUTH_HOOKS, BYMAX_AUTH_MEMBERSHIP_REPOSITORY, BYMAX_AUTH_OPTIONS, BYMAX_AUTH_PLATFORM_USER_REPOSITORY, BYMAX_AUTH_REDIS_CLIENT, BYMAX_AUTH_USER_REPOSITORY, BYMAX_AUTH_WORKSPACE_REPOSITORY, BruteForceService, BymaxAuthModule, ChangePasswordDto, CommonPasswordChecker, CreateInvitationDto, CurrentApiKey, CurrentUser, CurrentWorkspace, CurrentWsWorkspace, DefaultAuthEmailProvider, EmailChangeService, ForgotPasswordDto, HibpBreachChecker, IS_PUBLIC_KEY, InvitationService, JwtAuthGuard, JwtPlatformGuard, LoginDto, MembershipBumpFailedError, MembershipService, MfaChallengeDto, MfaDisableDto, MfaRegenerateRecoveryCodesDto, MfaRequiredGuard, MfaService, MfaVerifyDto, NoOpAuthHooks, NoOpEmailProvider, OAuthService, OptionalAuthGuard, OtpService, PLATFORM_ROLES_KEY, PasswordResetService, PlatformAuthService, PlatformLoginDto, PlatformRoles, PlatformRolesGuard, Public, ROLES_KEY, ReauthenticationService, RegisterDto, RequestEncoding, RequestEncodingGuard, ResendOtpDto, ResendVerificationDto, ResetPasswordDto, Roles, RolesGuard, SKIP_MFA_KEY, SelfOrAdminGuard, ServiceKey, SessionService, SkipMfa, TokenDeliveryService, TrustedOriginGuard, UserStatusGuard, VerifyEmailDto, VerifyOtpDto, WORKSPACE_CURSOR_MAX_LENGTH, WORKSPACE_CURSOR_PART_MAX_LENGTH, WORKSPACE_ID_MAX_LENGTH, WORKSPACE_OWNER_ROLE_MAX_LENGTH, WORKSPACE_PERMISSION_KEY, WORKSPACE_ROLES_KEY, WS_TICKET_TTL_SECONDS, WorkspaceAccessService, WorkspaceActionsService, WorkspaceCallerService, WorkspaceGuard, WorkspaceInvitationService, WorkspacePermission, WorkspaceRoles, WorkspaceService, WsAuthExceptionFilter, WsJwtGuard, WsTicketService, WsWorkspaceGuard, assertWorkspaceId, authDocumentSecurity, createAuthValidationPipe, decodeWorkspaceCursor, decodeWorkspaceScopedName, decrypt, describeChannelStatus, describeError, encodeWorkspaceCursor, encrypt, generateSecureToken, hasRole, hmacSha256, isServiceUnavailable, isWorkspaceOwnerRole, readWorkspacePosition, redactSecrets, reduceToBaseWord, sanitizeHeaders, sha256, sleep, stampJobContext, timingSafeCompare, workspacePositionOf, workspaceQueryKey, workspaceScopedName };
|
|
14626
|
-
export type { AcceptedInvitation, AcceptedSignup, AccountRemovalAudit, ActingMember, ApiKeyAccessEvent, ApiKeyClock, ApiKeyDenyReason, ApiKeyPrincipal, AuthApiKey, AuthApiKeySummary, AuthDocumentSecurityParams, AuthEmailCatalogue, AuthEmailContext, AuthEmailKind, AuthEmailMessage, AuthEmailSink, AuthErrorCode, AuthFieldError, AuthGuardFamily, AuthMembership, AuthModuleAsyncOptions, AuthPlane, AuthPlatformUser, AuthRateLimitWindow, AuthResult, AuthUser, AuthWorkspace, AuthenticatedRequest, BearerAuthResponse, BeforeRegisterResult, BeforeWorkspaceCreateResult, BootstrapInvitationRecord, BothAuthResponse, BymaxAuthModuleOptions, BymaxAuthRateLimitOptions, ChangeMembershipRoleParams, ClientIpSource, CookieAuthResponse, CountOwnedParams, CreateMembershipParams, CreateMembershipResult, CreateSessionParams, CreateUserData, CreateWithOAuthData, CreateWorkspaceResult, CreateWorkspaceWithOwnerParams, CurrentWorkspaceContext, DashboardJwtPayload, DefaultAuthEmailProviderOptions, DeliveryErrorPolicy, DeliveryErrorPolicyMap, FinalizeResult, FindUserByEmailParams, FindUserByOAuthIdParams, GuardedWriteResult, HookContext, IApiKeyRepository, IAuthHooks, IEmailProvider, IMembershipRepository, IPasswordBreachChecker, IPlatformUserRepository, IUserRepository, IWorkspaceRepository, InviteData, IssueApiKeyInput, IssuedApiKey, LastActiveWorkspaceRef, LinkOAuthParams, ListMembershipsForUserParams, ListMembershipsForWorkspaceParams, ListSessionsParams, ListSoleOwnedParams, LiveSessionParams, MemberChangeResult, MemberInvitationRecord, MembershipPage, MembershipRef, MembershipStatus, MembershipWithWorkspace, MfaChallengeResult, MfaSetupResult, MfaTempPayload, MyWorkspaces, OAuthLoginResult, OAuthMfaChallengeResult, OAuthProfile, OAuthProviderPlugin, OpenApiSecurityRequirement, PlatformAuthResult, PlatformAuthenticatedRequest, PlatformBearerAuthResponse, PlatformJwtPayload, RegistrationMode, RemoveAllMembershipsParams, RemoveAllMembershipsResult, RemoveMembershipParams, RemovedMembership, RenameWorkspaceParams, RenameWorkspaceResult, RequestEncodingPolicy, ResolvedOptions, ResolvedWorkspaceMember, RevocableTokenPayload, RevokeAllExceptCurrentParams, RevokeAllSessionsParams, RevokeSessionParams, RotateApiKeyInput, RotatedTokenResult, SafeAuthPlatformUser, SafeAuthUser, ScheduledDeletion, SessionAlertInfo, SessionInfo, SetLastActiveWorkspaceParams, SignupRequest, StoredWorkspaceInvitation, TenantResolverRequest, TenantScopedUserRef, TransferOwnershipParams, TransferOwnershipResult, UpdateEmailParams, UpdateEmailVerifiedParams, UpdateMfaData, UpdateMfaParams, UpdatePasswordParams, UpdatePlatformMfaData, UpdateStatusParams, UpdateWorkspaceStatusParams, UpdateWorkspaceStatusResult, VerifiedAccessToken, VerifiedWorkspaceAccessToken, VerifyAccessTokenOptions, WorkspaceAccess, WorkspaceAccessView, WorkspaceAction, WorkspaceActor, WorkspaceAuditEvent, WorkspaceCheck, WorkspaceInvitationPreview, WorkspaceInvitationView, WorkspaceInviteData, WorkspaceJobContext, WorkspaceOptions, WorkspacePermissionOptions, WorkspaceRef, WorkspaceRequest, WorkspaceRoleList, WorkspaceStatus, WsTicketSnapshot };
|
|
14719
|
+
export { ALLOW_PENDING_WORKSPACE_KEY, ANY_WORKSPACE_MEMBER, API_KEY_MAX_LABEL_LENGTH, API_KEY_MAX_OVERLAP_SECONDS, AUTH_EMAIL_KINDS, AUTH_ERROR_CODES, AUTH_ERROR_MESSAGES, AUTH_ERROR_STATUS, AUTH_PLANES, AUTH_SECRET_MIN_LENGTH, AUTH_SECURITY_SCHEMES, AUTH_THROTTLE_CONFIGS, AcceptInvitationDto, AccountStatusService, AllowAllBreachChecker, AllowPendingWorkspace, ApiKeyGuard, ApiKeyScopes, ApiKeyService, AuthException, AuthExceptionFilter, AuthHealthProbe, AuthMetricsTally, AuthRateLimit, AuthRateLimitGuard, AuthRevocationService, AuthService, AuthTokenVerifierService, Authenticated, BYMAX_AUTH_API_KEY_CLOCK, BYMAX_AUTH_API_KEY_REPOSITORY, BYMAX_AUTH_BREACH_CHECKER, BYMAX_AUTH_EMAIL_PROVIDER, BYMAX_AUTH_HOOKS, BYMAX_AUTH_MEMBERSHIP_REPOSITORY, BYMAX_AUTH_OPTIONS, BYMAX_AUTH_PLATFORM_USER_REPOSITORY, BYMAX_AUTH_REDIS_CLIENT, BYMAX_AUTH_USER_REPOSITORY, BYMAX_AUTH_WORKSPACE_REPOSITORY, BruteForceService, BymaxAuthModule, ChangePasswordDto, CommonPasswordChecker, CreateInvitationDto, CurrentApiKey, CurrentUser, CurrentWorkspace, CurrentWsWorkspace, DefaultAuthEmailProvider, EmailChangeService, ForgotPasswordDto, HibpBreachChecker, IS_PUBLIC_KEY, InvitationService, JwtAuthGuard, JwtPlatformGuard, LOGIN_OUTCOMES, LoginDto, MFA_OUTCOMES, MembershipBumpFailedError, MembershipService, MfaChallengeDto, MfaDisableDto, MfaRegenerateRecoveryCodesDto, MfaRequiredGuard, MfaService, MfaVerifyDto, NoOpAuthHooks, NoOpEmailProvider, OAuthService, OptionalAuthGuard, OtpService, PLATFORM_ROLES_KEY, PasswordResetService, PlatformAuthService, PlatformLoginDto, PlatformRoles, PlatformRolesGuard, Public, REFRESH_OUTCOMES, ROLES_KEY, ReauthenticationService, RegisterDto, RequestEncoding, RequestEncodingGuard, ResendOtpDto, ResendVerificationDto, ResetPasswordDto, Roles, RolesGuard, SKIP_MFA_KEY, SelfOrAdminGuard, ServiceKey, SessionService, SkipMfa, TokenDeliveryService, TrustedOriginGuard, UserStatusGuard, VerifyEmailDto, VerifyOtpDto, WORKSPACE_CURSOR_MAX_LENGTH, WORKSPACE_CURSOR_PART_MAX_LENGTH, WORKSPACE_ID_MAX_LENGTH, WORKSPACE_OWNER_ROLE_MAX_LENGTH, WORKSPACE_PERMISSION_KEY, WORKSPACE_ROLES_KEY, WS_TICKET_TTL_SECONDS, WorkspaceAccessService, WorkspaceActionsService, WorkspaceCallerService, WorkspaceGuard, WorkspaceInvitationService, WorkspacePermission, WorkspaceRoles, WorkspaceService, WsAuthExceptionFilter, WsJwtGuard, WsTicketService, WsWorkspaceGuard, assertWorkspaceId, authDocumentSecurity, createAuthValidationPipe, decodeWorkspaceCursor, decodeWorkspaceScopedName, decrypt, describeChannelStatus, describeError, encodeWorkspaceCursor, encrypt, generateSecureToken, hasRole, hmacSha256, isServiceUnavailable, isWorkspaceOwnerRole, readWorkspacePosition, redactSecrets, reduceToBaseWord, sanitizeHeaders, sha256, sleep, stampJobContext, timingSafeCompare, workspacePositionOf, workspaceQueryKey, workspaceScopedName };
|
|
14720
|
+
export type { AcceptedInvitation, AcceptedSignup, AccountRemovalAudit, ActingMember, ApiKeyAccessEvent, ApiKeyClock, ApiKeyDenyReason, ApiKeyPrincipal, AuthApiKey, AuthApiKeySummary, AuthDocumentSecurityParams, AuthEmailCatalogue, AuthEmailContext, AuthEmailKind, AuthEmailMessage, AuthEmailSink, AuthErrorCode, AuthFieldError, AuthGuardFamily, AuthMembership, AuthModuleAsyncOptions, AuthPlane, AuthPlatformUser, AuthRateLimitWindow, AuthResult, AuthUser, AuthWorkspace, AuthenticatedRequest, BearerAuthResponse, BeforeRegisterResult, BeforeWorkspaceCreateResult, BootstrapInvitationRecord, BothAuthResponse, BymaxAuthModuleOptions, BymaxAuthRateLimitOptions, ChangeMembershipRoleParams, ClientIpSource, CookieAuthResponse, CountOwnedParams, CreateMembershipParams, CreateMembershipResult, CreateSessionParams, CreateUserData, CreateWithOAuthData, CreateWorkspaceResult, CreateWorkspaceWithOwnerParams, CurrentWorkspaceContext, DashboardJwtPayload, DefaultAuthEmailProviderOptions, DeliveryErrorPolicy, DeliveryErrorPolicyMap, FinalizeResult, FindUserByEmailParams, FindUserByOAuthIdParams, GuardedWriteResult, HookContext, IApiKeyRepository, IAuthHooks, IEmailProvider, IMembershipRepository, IPasswordBreachChecker, IPlatformUserRepository, IUserRepository, IWorkspaceRepository, InviteData, IssueApiKeyInput, IssuedApiKey, LastActiveWorkspaceRef, LinkOAuthParams, ListMembershipsForUserParams, ListMembershipsForWorkspaceParams, ListSessionsParams, ListSoleOwnedParams, LiveSessionParams, LoginOutcome, MemberChangeResult, MemberInvitationRecord, MembershipPage, MembershipRef, MembershipStatus, MembershipWithWorkspace, MfaChallengeResult, MfaOutcome, MfaSetupResult, MfaTempPayload, MyWorkspaces, OAuthLoginResult, OAuthMfaChallengeResult, OAuthProfile, OAuthProviderPlugin, OpenApiSecurityRequirement, PlatformAuthResult, PlatformAuthenticatedRequest, PlatformBearerAuthResponse, PlatformJwtPayload, RefreshOutcome, RegistrationMode, RemoveAllMembershipsParams, RemoveAllMembershipsResult, RemoveMembershipParams, RemovedMembership, RenameWorkspaceParams, RenameWorkspaceResult, RequestEncodingPolicy, ResolvedOptions, ResolvedWorkspaceMember, RevocableTokenPayload, RevokeAllExceptCurrentParams, RevokeAllSessionsParams, RevokeSessionParams, RotateApiKeyInput, RotatedTokenResult, SafeAuthPlatformUser, SafeAuthUser, ScheduledDeletion, SessionAlertInfo, SessionInfo, SetLastActiveWorkspaceParams, SignupRequest, StoredWorkspaceInvitation, TenantResolverRequest, TenantScopedUserRef, TransferOwnershipParams, TransferOwnershipResult, UpdateEmailParams, UpdateEmailVerifiedParams, UpdateMfaData, UpdateMfaParams, UpdatePasswordParams, UpdatePlatformMfaData, UpdateStatusParams, UpdateWorkspaceStatusParams, UpdateWorkspaceStatusResult, VerifiedAccessToken, VerifiedWorkspaceAccessToken, VerifyAccessTokenOptions, WorkspaceAccess, WorkspaceAccessView, WorkspaceAction, WorkspaceActor, WorkspaceAuditEvent, WorkspaceCheck, WorkspaceInvitationPreview, WorkspaceInvitationView, WorkspaceInviteData, WorkspaceJobContext, WorkspaceOptions, WorkspacePermissionOptions, WorkspaceRef, WorkspaceRequest, WorkspaceRoleList, WorkspaceStatus, WsTicketSnapshot };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1189,12 +1189,12 @@ interface BymaxAuthModuleOptions {
|
|
|
1189
1189
|
/**
|
|
1190
1190
|
* `Path` attribute for the short-lived `mfa_temp_token` cookie planted
|
|
1191
1191
|
* by the OAuth callback (lib v1.0.7+) and cleared by the MFA challenge
|
|
1192
|
-
* controller. Defaults to
|
|
1193
|
-
*
|
|
1192
|
+
* controller. Defaults to `/auth/mfa`, which does not follow `routePrefix`
|
|
1193
|
+
* — correct for the default prefix with no Nest global prefix.
|
|
1194
1194
|
*
|
|
1195
|
-
* Set this explicitly when the consumer
|
|
1196
|
-
*
|
|
1197
|
-
* construction time. For example, with `setGlobalPrefix('api')` and
|
|
1195
|
+
* Set this explicitly when the consumer changes `routePrefix` or calls
|
|
1196
|
+
* `app.setGlobalPrefix(...)`: the library cannot observe the global
|
|
1197
|
+
* prefix at module construction time. For example, with `setGlobalPrefix('api')` and
|
|
1198
1198
|
* default `routePrefix: 'auth'`, the real challenge URL is
|
|
1199
1199
|
* `/api/auth/mfa/challenge` — but `Path=/auth/mfa` will NOT be sent
|
|
1200
1200
|
* by the browser (RFC 6265 prefix-match). Set this to `'/api/auth/mfa'`
|
|
@@ -5236,21 +5236,21 @@ interface IMembershipRepository {
|
|
|
5236
5236
|
declare class NoOpEmailProvider implements IEmailProvider {
|
|
5237
5237
|
private readonly logger;
|
|
5238
5238
|
/** @inheritdoc */
|
|
5239
|
-
sendPasswordResetToken(_tenantId: string,
|
|
5239
|
+
sendPasswordResetToken(_tenantId: string, _email: string, _token: string, _locale?: string): Promise<void>;
|
|
5240
5240
|
/** @inheritdoc */
|
|
5241
|
-
sendPasswordResetOtp(_tenantId: string,
|
|
5241
|
+
sendPasswordResetOtp(_tenantId: string, _email: string, _otp: string, _locale?: string): Promise<void>;
|
|
5242
5242
|
/** @inheritdoc */
|
|
5243
|
-
sendEmailVerificationOtp(_tenantId: string,
|
|
5243
|
+
sendEmailVerificationOtp(_tenantId: string, _email: string, _otp: string, _locale?: string): Promise<void>;
|
|
5244
5244
|
/** @inheritdoc */
|
|
5245
|
-
sendMfaEnabledNotification(_tenantId: string,
|
|
5245
|
+
sendMfaEnabledNotification(_tenantId: string, _email: string, _locale?: string): Promise<void>;
|
|
5246
5246
|
/** @inheritdoc */
|
|
5247
|
-
sendMfaDisabledNotification(_tenantId: string,
|
|
5247
|
+
sendMfaDisabledNotification(_tenantId: string, _email: string, _locale?: string): Promise<void>;
|
|
5248
5248
|
/** @inheritdoc */
|
|
5249
|
-
sendNewSessionAlert(_tenantId: string,
|
|
5249
|
+
sendNewSessionAlert(_tenantId: string, _email: string, _sessionInfo: SessionAlertInfo, _locale?: string): Promise<void>;
|
|
5250
5250
|
/** @inheritdoc */
|
|
5251
|
-
sendInvitation(_tenantId: string,
|
|
5251
|
+
sendInvitation(_tenantId: string, _email: string, _inviteData: InviteData, _locale?: string): Promise<void>;
|
|
5252
5252
|
/** @inheritdoc */
|
|
5253
|
-
sendWorkspaceInvitation(_tenantId: string,
|
|
5253
|
+
sendWorkspaceInvitation(_tenantId: string, _email: string, _data: WorkspaceInviteData, _locale?: string): Promise<void>;
|
|
5254
5254
|
}
|
|
5255
5255
|
|
|
5256
5256
|
/**
|
|
@@ -9013,6 +9013,55 @@ declare class VerifyOtpDto {
|
|
|
9013
9013
|
tenantId?: string;
|
|
9014
9014
|
}
|
|
9015
9015
|
|
|
9016
|
+
/**
|
|
9017
|
+
* @fileoverview The counts the auth flows keep for whoever publishes metrics, with every label set closed.
|
|
9018
|
+
*
|
|
9019
|
+
* @layer Service
|
|
9020
|
+
*/
|
|
9021
|
+
|
|
9022
|
+
/** The two planes an authentication flow runs on. */
|
|
9023
|
+
declare const AUTH_PLANES: readonly ["dashboard", "platform"];
|
|
9024
|
+
/** What a login attempt ended as. */
|
|
9025
|
+
declare const LOGIN_OUTCOMES: readonly ["success", "invalid_credentials", "locked", "mfa_required", "blocked"];
|
|
9026
|
+
/** What a refresh attempt ended as. */
|
|
9027
|
+
declare const REFRESH_OUTCOMES: readonly ["rotated", "reuse_detected", "expired", "invalid"];
|
|
9028
|
+
/** What an MFA verification ended as. */
|
|
9029
|
+
declare const MFA_OUTCOMES: readonly ["success", "invalid", "locked"];
|
|
9030
|
+
/** What a login attempt ended as, one of {@link LOGIN_OUTCOMES}. */
|
|
9031
|
+
type LoginOutcome = (typeof LOGIN_OUTCOMES)[number];
|
|
9032
|
+
/** What a refresh attempt ended as, one of {@link REFRESH_OUTCOMES}. */
|
|
9033
|
+
type RefreshOutcome = (typeof REFRESH_OUTCOMES)[number];
|
|
9034
|
+
/** What an MFA verification ended as, one of {@link MFA_OUTCOMES}. */
|
|
9035
|
+
type MfaOutcome = (typeof MFA_OUTCOMES)[number];
|
|
9036
|
+
/** A count for each outcome on each plane. */
|
|
9037
|
+
type PlaneCounts<K extends string> = Readonly<Record<AuthPlane, Readonly<Record<K, number>>>>;
|
|
9038
|
+
/**
|
|
9039
|
+
* Counts what the authentication flows do, in plain numbers.
|
|
9040
|
+
*
|
|
9041
|
+
* It exists so that the code that does the work never imports a metrics library: an application that
|
|
9042
|
+
* publishes nothing pays for a few integer increments, and the optional `observability` subpath reads
|
|
9043
|
+
* these numbers when it is scraped. Each count is keyed by a closed set, so no label can grow with the
|
|
9044
|
+
* traffic, and nothing a caller or a host supplied is ever a key.
|
|
9045
|
+
*/
|
|
9046
|
+
declare class AuthMetricsTally {
|
|
9047
|
+
#private;
|
|
9048
|
+
/** A login attempt on `plane` ended as `outcome`. */
|
|
9049
|
+
login(plane: AuthPlane, outcome: LoginOutcome): void;
|
|
9050
|
+
/** A refresh attempt on `plane` ended as `outcome`. */
|
|
9051
|
+
refresh(plane: AuthPlane, outcome: RefreshOutcome): void;
|
|
9052
|
+
/** An MFA verification on `plane` ended as `outcome`. */
|
|
9053
|
+
mfa(plane: AuthPlane, outcome: MfaOutcome): void;
|
|
9054
|
+
/** A run of failures reached the threshold and locked an identifier out. */
|
|
9055
|
+
lockout(): void;
|
|
9056
|
+
/** The counts so far, as copies. */
|
|
9057
|
+
snapshot(): {
|
|
9058
|
+
readonly logins: PlaneCounts<LoginOutcome>;
|
|
9059
|
+
readonly refreshes: PlaneCounts<RefreshOutcome>;
|
|
9060
|
+
readonly mfa: PlaneCounts<MfaOutcome>;
|
|
9061
|
+
readonly lockouts: number;
|
|
9062
|
+
};
|
|
9063
|
+
}
|
|
9064
|
+
|
|
9016
9065
|
/**
|
|
9017
9066
|
* Guards authentication endpoints against brute-force attacks by tracking
|
|
9018
9067
|
* failed attempt counts in Redis.
|
|
@@ -9037,10 +9086,11 @@ declare class VerifyOtpDto {
|
|
|
9037
9086
|
*/
|
|
9038
9087
|
declare class BruteForceService {
|
|
9039
9088
|
private readonly redis;
|
|
9089
|
+
private readonly tally?;
|
|
9040
9090
|
private readonly logger;
|
|
9041
9091
|
private readonly maxAttempts;
|
|
9042
9092
|
private readonly windowSeconds;
|
|
9043
|
-
constructor(redis: AuthRedisService, options: ResolvedOptions);
|
|
9093
|
+
constructor(redis: AuthRedisService, options: ResolvedOptions, tally?: AuthMetricsTally | undefined);
|
|
9044
9094
|
/**
|
|
9045
9095
|
* Returns `true` when the identifier has reached or exceeded the failure threshold.
|
|
9046
9096
|
*
|
|
@@ -9911,8 +9961,7 @@ declare class TokenManagerService {
|
|
|
9911
9961
|
* consumer subscribes to this hook. `userId` says whose account the family belongs to; `ip` and
|
|
9912
9962
|
* `userAgent` are the only description of the party holding the token that should not exist, so
|
|
9913
9963
|
* a report carrying the first and not the second says a compromise happened and gives nothing
|
|
9914
|
-
* to act on.
|
|
9915
|
-
* `reissueTokens` had both values in scope as its own parameters.
|
|
9964
|
+
* to act on.
|
|
9916
9965
|
*
|
|
9917
9966
|
* `sanitizedHeaders` stays empty and that is honest — the rotation path receives the address
|
|
9918
9967
|
* and the agent, never the header map, so there is nothing to sanitize. Inventing one would be
|
|
@@ -10212,6 +10261,20 @@ declare class TokenManagerService {
|
|
|
10212
10261
|
jti: string;
|
|
10213
10262
|
tenantId?: string;
|
|
10214
10263
|
}>;
|
|
10264
|
+
/**
|
|
10265
|
+
* Refuses a temp token whose tenant claim does not fit its plane.
|
|
10266
|
+
*
|
|
10267
|
+
* @param payload - The claims of a token whose signature held.
|
|
10268
|
+
* @throws {@link AuthException} with `MFA_TEMP_TOKEN_INVALID`.
|
|
10269
|
+
*/
|
|
10270
|
+
private assertMfaTempTokenBinding;
|
|
10271
|
+
/**
|
|
10272
|
+
* Refuses a temp token whose Redis entry is gone, names another account, or predates a bulk revocation.
|
|
10273
|
+
*
|
|
10274
|
+
* @param payload - The claims of a token whose signature held.
|
|
10275
|
+
* @throws {@link AuthException} with `MFA_TEMP_TOKEN_INVALID`.
|
|
10276
|
+
*/
|
|
10277
|
+
private assertMfaTempTokenLive;
|
|
10215
10278
|
/**
|
|
10216
10279
|
* Atomically consumes a previously-verified MFA temp token.
|
|
10217
10280
|
*
|
|
@@ -10707,6 +10770,8 @@ declare class AuthService {
|
|
|
10707
10770
|
* refused login into a different refusal, nor a successful one into a failure.
|
|
10708
10771
|
*/
|
|
10709
10772
|
private fireAndForget;
|
|
10773
|
+
/** Writes the event of a password login that reached its end: tokens issued, or an MFA challenge. */
|
|
10774
|
+
private logLogin;
|
|
10710
10775
|
private assertUserNotBlocked;
|
|
10711
10776
|
private sendVerificationOtp;
|
|
10712
10777
|
}
|
|
@@ -11407,8 +11472,7 @@ declare class MfaManagementService {
|
|
|
11407
11472
|
/**
|
|
11408
11473
|
* Tells the account holder their second factor was turned off.
|
|
11409
11474
|
*
|
|
11410
|
-
* @param
|
|
11411
|
-
* @param scope - The plane, account and tenant that changed.
|
|
11475
|
+
* @param kind - The flow that turned the factor off, for the event.
|
|
11412
11476
|
* @param user - The account, read for its address.
|
|
11413
11477
|
*/
|
|
11414
11478
|
private notifyDisabled;
|
|
@@ -11675,6 +11739,39 @@ declare class MfaService {
|
|
|
11675
11739
|
}>;
|
|
11676
11740
|
}
|
|
11677
11741
|
|
|
11742
|
+
/**
|
|
11743
|
+
* Asks the Redis client the module was given whether it answers.
|
|
11744
|
+
*
|
|
11745
|
+
* A `PING` writes nothing and reads nothing a caller owns, so a readiness probe costs the store one round
|
|
11746
|
+
* trip and no data. It lives in the main entry because the client is private to the module; the optional
|
|
11747
|
+
* `observability` subpath wraps it as a health indicator.
|
|
11748
|
+
*
|
|
11749
|
+
* Each probe is bounded: it gives up after {@link PING_TIMEOUT_MS} or when the caller's signal aborts,
|
|
11750
|
+
* whichever is first, so a stalled socket cannot hold a readiness check open. Probes that arrive while a
|
|
11751
|
+
* `PING` is still pending share it, so a store that never answers is asked once, not once per probe. A
|
|
11752
|
+
* `PING` that has outlived the timeout is not shared any longer: the next probe sends a fresh one, so a
|
|
11753
|
+
* command the client never settles cannot keep the readiness check down after the store has recovered, and
|
|
11754
|
+
* at most one `PING` is sent per timeout window.
|
|
11755
|
+
*/
|
|
11756
|
+
declare class AuthHealthProbe {
|
|
11757
|
+
#private;
|
|
11758
|
+
private readonly redis;
|
|
11759
|
+
constructor(redis: {
|
|
11760
|
+
ping(): Promise<string>;
|
|
11761
|
+
});
|
|
11762
|
+
/**
|
|
11763
|
+
* Whether the store answers a `PING` in time.
|
|
11764
|
+
*
|
|
11765
|
+
* @param signal - Aborted when the caller stops waiting; the probe then rejects without waiting longer.
|
|
11766
|
+
* @returns `true` when it answers `PONG`, `false` for any other answer.
|
|
11767
|
+
* @throws When the store cannot be reached, does not answer in time, or the signal aborts; the health
|
|
11768
|
+
* aggregator turns the rejection into a `down` entry.
|
|
11769
|
+
*/
|
|
11770
|
+
ping(signal?: AbortSignal): Promise<boolean>;
|
|
11771
|
+
/** `answer`, or a rejection as soon as `signal` aborts. */
|
|
11772
|
+
private within;
|
|
11773
|
+
}
|
|
11774
|
+
|
|
11678
11775
|
/**
|
|
11679
11776
|
* Manages tenant invitation flows — creating and accepting invitations.
|
|
11680
11777
|
*
|
|
@@ -13101,8 +13198,6 @@ declare class OAuthService {
|
|
|
13101
13198
|
* Issues the MFA temp token for an account that has a second factor.
|
|
13102
13199
|
*
|
|
13103
13200
|
* @param authUser - The account the flow resolved to.
|
|
13104
|
-
* @param provider - The provider name, for the log line.
|
|
13105
|
-
* @param hookResult - The hook's decision, whose action goes in the log line.
|
|
13106
13201
|
* @returns The challenge the controller plants in a cookie or surfaces in the body.
|
|
13107
13202
|
*/
|
|
13108
13203
|
private issueMfaChallenge;
|
|
@@ -13136,7 +13231,6 @@ declare class OAuthService {
|
|
|
13136
13231
|
/**
|
|
13137
13232
|
* Reads and deletes the state record of a flow, in one step so it can be used once.
|
|
13138
13233
|
*
|
|
13139
|
-
* @param provider - The provider named by the callback path, for the log lines.
|
|
13140
13234
|
* @param state - The `state` query value.
|
|
13141
13235
|
* @returns The stored record.
|
|
13142
13236
|
* @throws `AuthException(OAUTH_FAILED)` for a state that is missing, unparseable or malformed.
|
|
@@ -14622,5 +14716,5 @@ declare class WorkspaceInvitationService {
|
|
|
14622
14716
|
private activeWorkspace;
|
|
14623
14717
|
}
|
|
14624
14718
|
|
|
14625
|
-
export { ALLOW_PENDING_WORKSPACE_KEY, ANY_WORKSPACE_MEMBER, API_KEY_MAX_LABEL_LENGTH, API_KEY_MAX_OVERLAP_SECONDS, AUTH_EMAIL_KINDS, AUTH_ERROR_CODES, AUTH_ERROR_MESSAGES, AUTH_ERROR_STATUS, AUTH_SECRET_MIN_LENGTH, AUTH_SECURITY_SCHEMES, AUTH_THROTTLE_CONFIGS, AcceptInvitationDto, AccountStatusService, AllowAllBreachChecker, AllowPendingWorkspace, ApiKeyGuard, ApiKeyScopes, ApiKeyService, AuthException, AuthExceptionFilter, AuthRateLimit, AuthRateLimitGuard, AuthRevocationService, AuthService, AuthTokenVerifierService, Authenticated, BYMAX_AUTH_API_KEY_CLOCK, BYMAX_AUTH_API_KEY_REPOSITORY, BYMAX_AUTH_BREACH_CHECKER, BYMAX_AUTH_EMAIL_PROVIDER, BYMAX_AUTH_HOOKS, BYMAX_AUTH_MEMBERSHIP_REPOSITORY, BYMAX_AUTH_OPTIONS, BYMAX_AUTH_PLATFORM_USER_REPOSITORY, BYMAX_AUTH_REDIS_CLIENT, BYMAX_AUTH_USER_REPOSITORY, BYMAX_AUTH_WORKSPACE_REPOSITORY, BruteForceService, BymaxAuthModule, ChangePasswordDto, CommonPasswordChecker, CreateInvitationDto, CurrentApiKey, CurrentUser, CurrentWorkspace, CurrentWsWorkspace, DefaultAuthEmailProvider, EmailChangeService, ForgotPasswordDto, HibpBreachChecker, IS_PUBLIC_KEY, InvitationService, JwtAuthGuard, JwtPlatformGuard, LoginDto, MembershipBumpFailedError, MembershipService, MfaChallengeDto, MfaDisableDto, MfaRegenerateRecoveryCodesDto, MfaRequiredGuard, MfaService, MfaVerifyDto, NoOpAuthHooks, NoOpEmailProvider, OAuthService, OptionalAuthGuard, OtpService, PLATFORM_ROLES_KEY, PasswordResetService, PlatformAuthService, PlatformLoginDto, PlatformRoles, PlatformRolesGuard, Public, ROLES_KEY, ReauthenticationService, RegisterDto, RequestEncoding, RequestEncodingGuard, ResendOtpDto, ResendVerificationDto, ResetPasswordDto, Roles, RolesGuard, SKIP_MFA_KEY, SelfOrAdminGuard, ServiceKey, SessionService, SkipMfa, TokenDeliveryService, TrustedOriginGuard, UserStatusGuard, VerifyEmailDto, VerifyOtpDto, WORKSPACE_CURSOR_MAX_LENGTH, WORKSPACE_CURSOR_PART_MAX_LENGTH, WORKSPACE_ID_MAX_LENGTH, WORKSPACE_OWNER_ROLE_MAX_LENGTH, WORKSPACE_PERMISSION_KEY, WORKSPACE_ROLES_KEY, WS_TICKET_TTL_SECONDS, WorkspaceAccessService, WorkspaceActionsService, WorkspaceCallerService, WorkspaceGuard, WorkspaceInvitationService, WorkspacePermission, WorkspaceRoles, WorkspaceService, WsAuthExceptionFilter, WsJwtGuard, WsTicketService, WsWorkspaceGuard, assertWorkspaceId, authDocumentSecurity, createAuthValidationPipe, decodeWorkspaceCursor, decodeWorkspaceScopedName, decrypt, describeChannelStatus, describeError, encodeWorkspaceCursor, encrypt, generateSecureToken, hasRole, hmacSha256, isServiceUnavailable, isWorkspaceOwnerRole, readWorkspacePosition, redactSecrets, reduceToBaseWord, sanitizeHeaders, sha256, sleep, stampJobContext, timingSafeCompare, workspacePositionOf, workspaceQueryKey, workspaceScopedName };
|
|
14626
|
-
export type { AcceptedInvitation, AcceptedSignup, AccountRemovalAudit, ActingMember, ApiKeyAccessEvent, ApiKeyClock, ApiKeyDenyReason, ApiKeyPrincipal, AuthApiKey, AuthApiKeySummary, AuthDocumentSecurityParams, AuthEmailCatalogue, AuthEmailContext, AuthEmailKind, AuthEmailMessage, AuthEmailSink, AuthErrorCode, AuthFieldError, AuthGuardFamily, AuthMembership, AuthModuleAsyncOptions, AuthPlane, AuthPlatformUser, AuthRateLimitWindow, AuthResult, AuthUser, AuthWorkspace, AuthenticatedRequest, BearerAuthResponse, BeforeRegisterResult, BeforeWorkspaceCreateResult, BootstrapInvitationRecord, BothAuthResponse, BymaxAuthModuleOptions, BymaxAuthRateLimitOptions, ChangeMembershipRoleParams, ClientIpSource, CookieAuthResponse, CountOwnedParams, CreateMembershipParams, CreateMembershipResult, CreateSessionParams, CreateUserData, CreateWithOAuthData, CreateWorkspaceResult, CreateWorkspaceWithOwnerParams, CurrentWorkspaceContext, DashboardJwtPayload, DefaultAuthEmailProviderOptions, DeliveryErrorPolicy, DeliveryErrorPolicyMap, FinalizeResult, FindUserByEmailParams, FindUserByOAuthIdParams, GuardedWriteResult, HookContext, IApiKeyRepository, IAuthHooks, IEmailProvider, IMembershipRepository, IPasswordBreachChecker, IPlatformUserRepository, IUserRepository, IWorkspaceRepository, InviteData, IssueApiKeyInput, IssuedApiKey, LastActiveWorkspaceRef, LinkOAuthParams, ListMembershipsForUserParams, ListMembershipsForWorkspaceParams, ListSessionsParams, ListSoleOwnedParams, LiveSessionParams, MemberChangeResult, MemberInvitationRecord, MembershipPage, MembershipRef, MembershipStatus, MembershipWithWorkspace, MfaChallengeResult, MfaSetupResult, MfaTempPayload, MyWorkspaces, OAuthLoginResult, OAuthMfaChallengeResult, OAuthProfile, OAuthProviderPlugin, OpenApiSecurityRequirement, PlatformAuthResult, PlatformAuthenticatedRequest, PlatformBearerAuthResponse, PlatformJwtPayload, RegistrationMode, RemoveAllMembershipsParams, RemoveAllMembershipsResult, RemoveMembershipParams, RemovedMembership, RenameWorkspaceParams, RenameWorkspaceResult, RequestEncodingPolicy, ResolvedOptions, ResolvedWorkspaceMember, RevocableTokenPayload, RevokeAllExceptCurrentParams, RevokeAllSessionsParams, RevokeSessionParams, RotateApiKeyInput, RotatedTokenResult, SafeAuthPlatformUser, SafeAuthUser, ScheduledDeletion, SessionAlertInfo, SessionInfo, SetLastActiveWorkspaceParams, SignupRequest, StoredWorkspaceInvitation, TenantResolverRequest, TenantScopedUserRef, TransferOwnershipParams, TransferOwnershipResult, UpdateEmailParams, UpdateEmailVerifiedParams, UpdateMfaData, UpdateMfaParams, UpdatePasswordParams, UpdatePlatformMfaData, UpdateStatusParams, UpdateWorkspaceStatusParams, UpdateWorkspaceStatusResult, VerifiedAccessToken, VerifiedWorkspaceAccessToken, VerifyAccessTokenOptions, WorkspaceAccess, WorkspaceAccessView, WorkspaceAction, WorkspaceActor, WorkspaceAuditEvent, WorkspaceCheck, WorkspaceInvitationPreview, WorkspaceInvitationView, WorkspaceInviteData, WorkspaceJobContext, WorkspaceOptions, WorkspacePermissionOptions, WorkspaceRef, WorkspaceRequest, WorkspaceRoleList, WorkspaceStatus, WsTicketSnapshot };
|
|
14719
|
+
export { ALLOW_PENDING_WORKSPACE_KEY, ANY_WORKSPACE_MEMBER, API_KEY_MAX_LABEL_LENGTH, API_KEY_MAX_OVERLAP_SECONDS, AUTH_EMAIL_KINDS, AUTH_ERROR_CODES, AUTH_ERROR_MESSAGES, AUTH_ERROR_STATUS, AUTH_PLANES, AUTH_SECRET_MIN_LENGTH, AUTH_SECURITY_SCHEMES, AUTH_THROTTLE_CONFIGS, AcceptInvitationDto, AccountStatusService, AllowAllBreachChecker, AllowPendingWorkspace, ApiKeyGuard, ApiKeyScopes, ApiKeyService, AuthException, AuthExceptionFilter, AuthHealthProbe, AuthMetricsTally, AuthRateLimit, AuthRateLimitGuard, AuthRevocationService, AuthService, AuthTokenVerifierService, Authenticated, BYMAX_AUTH_API_KEY_CLOCK, BYMAX_AUTH_API_KEY_REPOSITORY, BYMAX_AUTH_BREACH_CHECKER, BYMAX_AUTH_EMAIL_PROVIDER, BYMAX_AUTH_HOOKS, BYMAX_AUTH_MEMBERSHIP_REPOSITORY, BYMAX_AUTH_OPTIONS, BYMAX_AUTH_PLATFORM_USER_REPOSITORY, BYMAX_AUTH_REDIS_CLIENT, BYMAX_AUTH_USER_REPOSITORY, BYMAX_AUTH_WORKSPACE_REPOSITORY, BruteForceService, BymaxAuthModule, ChangePasswordDto, CommonPasswordChecker, CreateInvitationDto, CurrentApiKey, CurrentUser, CurrentWorkspace, CurrentWsWorkspace, DefaultAuthEmailProvider, EmailChangeService, ForgotPasswordDto, HibpBreachChecker, IS_PUBLIC_KEY, InvitationService, JwtAuthGuard, JwtPlatformGuard, LOGIN_OUTCOMES, LoginDto, MFA_OUTCOMES, MembershipBumpFailedError, MembershipService, MfaChallengeDto, MfaDisableDto, MfaRegenerateRecoveryCodesDto, MfaRequiredGuard, MfaService, MfaVerifyDto, NoOpAuthHooks, NoOpEmailProvider, OAuthService, OptionalAuthGuard, OtpService, PLATFORM_ROLES_KEY, PasswordResetService, PlatformAuthService, PlatformLoginDto, PlatformRoles, PlatformRolesGuard, Public, REFRESH_OUTCOMES, ROLES_KEY, ReauthenticationService, RegisterDto, RequestEncoding, RequestEncodingGuard, ResendOtpDto, ResendVerificationDto, ResetPasswordDto, Roles, RolesGuard, SKIP_MFA_KEY, SelfOrAdminGuard, ServiceKey, SessionService, SkipMfa, TokenDeliveryService, TrustedOriginGuard, UserStatusGuard, VerifyEmailDto, VerifyOtpDto, WORKSPACE_CURSOR_MAX_LENGTH, WORKSPACE_CURSOR_PART_MAX_LENGTH, WORKSPACE_ID_MAX_LENGTH, WORKSPACE_OWNER_ROLE_MAX_LENGTH, WORKSPACE_PERMISSION_KEY, WORKSPACE_ROLES_KEY, WS_TICKET_TTL_SECONDS, WorkspaceAccessService, WorkspaceActionsService, WorkspaceCallerService, WorkspaceGuard, WorkspaceInvitationService, WorkspacePermission, WorkspaceRoles, WorkspaceService, WsAuthExceptionFilter, WsJwtGuard, WsTicketService, WsWorkspaceGuard, assertWorkspaceId, authDocumentSecurity, createAuthValidationPipe, decodeWorkspaceCursor, decodeWorkspaceScopedName, decrypt, describeChannelStatus, describeError, encodeWorkspaceCursor, encrypt, generateSecureToken, hasRole, hmacSha256, isServiceUnavailable, isWorkspaceOwnerRole, readWorkspacePosition, redactSecrets, reduceToBaseWord, sanitizeHeaders, sha256, sleep, stampJobContext, timingSafeCompare, workspacePositionOf, workspaceQueryKey, workspaceScopedName };
|
|
14720
|
+
export type { AcceptedInvitation, AcceptedSignup, AccountRemovalAudit, ActingMember, ApiKeyAccessEvent, ApiKeyClock, ApiKeyDenyReason, ApiKeyPrincipal, AuthApiKey, AuthApiKeySummary, AuthDocumentSecurityParams, AuthEmailCatalogue, AuthEmailContext, AuthEmailKind, AuthEmailMessage, AuthEmailSink, AuthErrorCode, AuthFieldError, AuthGuardFamily, AuthMembership, AuthModuleAsyncOptions, AuthPlane, AuthPlatformUser, AuthRateLimitWindow, AuthResult, AuthUser, AuthWorkspace, AuthenticatedRequest, BearerAuthResponse, BeforeRegisterResult, BeforeWorkspaceCreateResult, BootstrapInvitationRecord, BothAuthResponse, BymaxAuthModuleOptions, BymaxAuthRateLimitOptions, ChangeMembershipRoleParams, ClientIpSource, CookieAuthResponse, CountOwnedParams, CreateMembershipParams, CreateMembershipResult, CreateSessionParams, CreateUserData, CreateWithOAuthData, CreateWorkspaceResult, CreateWorkspaceWithOwnerParams, CurrentWorkspaceContext, DashboardJwtPayload, DefaultAuthEmailProviderOptions, DeliveryErrorPolicy, DeliveryErrorPolicyMap, FinalizeResult, FindUserByEmailParams, FindUserByOAuthIdParams, GuardedWriteResult, HookContext, IApiKeyRepository, IAuthHooks, IEmailProvider, IMembershipRepository, IPasswordBreachChecker, IPlatformUserRepository, IUserRepository, IWorkspaceRepository, InviteData, IssueApiKeyInput, IssuedApiKey, LastActiveWorkspaceRef, LinkOAuthParams, ListMembershipsForUserParams, ListMembershipsForWorkspaceParams, ListSessionsParams, ListSoleOwnedParams, LiveSessionParams, LoginOutcome, MemberChangeResult, MemberInvitationRecord, MembershipPage, MembershipRef, MembershipStatus, MembershipWithWorkspace, MfaChallengeResult, MfaOutcome, MfaSetupResult, MfaTempPayload, MyWorkspaces, OAuthLoginResult, OAuthMfaChallengeResult, OAuthProfile, OAuthProviderPlugin, OpenApiSecurityRequirement, PlatformAuthResult, PlatformAuthenticatedRequest, PlatformBearerAuthResponse, PlatformJwtPayload, RefreshOutcome, RegistrationMode, RemoveAllMembershipsParams, RemoveAllMembershipsResult, RemoveMembershipParams, RemovedMembership, RenameWorkspaceParams, RenameWorkspaceResult, RequestEncodingPolicy, ResolvedOptions, ResolvedWorkspaceMember, RevocableTokenPayload, RevokeAllExceptCurrentParams, RevokeAllSessionsParams, RevokeSessionParams, RotateApiKeyInput, RotatedTokenResult, SafeAuthPlatformUser, SafeAuthUser, ScheduledDeletion, SessionAlertInfo, SessionInfo, SetLastActiveWorkspaceParams, SignupRequest, StoredWorkspaceInvitation, TenantResolverRequest, TenantScopedUserRef, TransferOwnershipParams, TransferOwnershipResult, UpdateEmailParams, UpdateEmailVerifiedParams, UpdateMfaData, UpdateMfaParams, UpdatePasswordParams, UpdatePlatformMfaData, UpdateStatusParams, UpdateWorkspaceStatusParams, UpdateWorkspaceStatusResult, VerifiedAccessToken, VerifiedWorkspaceAccessToken, VerifyAccessTokenOptions, WorkspaceAccess, WorkspaceAccessView, WorkspaceAction, WorkspaceActor, WorkspaceAuditEvent, WorkspaceCheck, WorkspaceInvitationPreview, WorkspaceInvitationView, WorkspaceInviteData, WorkspaceJobContext, WorkspaceOptions, WorkspacePermissionOptions, WorkspaceRef, WorkspaceRequest, WorkspaceRoleList, WorkspaceStatus, WsTicketSnapshot };
|