Skip to content

@sourceloop/authentication-service / Exports

@sourceloop/authentication-service

Table of contents

Namespaces

Enumerations

Classes

Interfaces

Type Aliases

Variables

Type Aliases

ActorId

Ƭ ActorId: Extract<keyof UserTenant, string>

Defined in

services/authentication-service/src/types.ts:58


ApplePostVerifyFn

Ƭ ApplePostVerifyFn: (profile: AppleStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile AppleStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:76


ApplePreVerifyFn

Ƭ ApplePreVerifyFn: (accessToken: string, refreshToken: string, profile: AppleStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (accessToken, refreshToken, profile, user): Promise<IAuthUser | null>

Parameters
Name Type
accessToken string
refreshToken string
profile AppleStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:69


AppleSignUpFn

Ƭ AppleSignUpFn: (profile: AppleStrategy.Profile) => Promise<User & UserRelations | null>

Type declaration

▸ (profile): Promise<User & UserRelations | null>

Parameters
Name Type
profile AppleStrategy.Profile
Returns

Promise<User & UserRelations | null>

Defined in

services/authentication-service/src/providers/types.ts:65


AuthCodeGeneratorFn

Ƭ AuthCodeGeneratorFn: (client: AuthClient, user: AuthUser) => Promise<string>

Type declaration

▸ (client, user): Promise<string>

Parameters
Name Type
client AuthClient
user AuthUser
Returns

Promise<string>

Defined in

services/authentication-service/src/providers/types.ts:131


AuthenticationProviderFn

Ƭ AuthenticationProviderFn: (accessToken: string) => Promise<boolean>

Type declaration

▸ (accessToken): Promise<boolean>

Parameters
Name Type
accessToken string
Returns

Promise<boolean>

Defined in

services/authentication-service/src/providers/types.ts:44


AzureAdPostVerifyFn

Ƭ AzureAdPostVerifyFn: (profile: AzureADStrategy.IProfile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile AzureADStrategy.IProfile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:159


AzureAdPreVerifyFn

Ƭ AzureAdPreVerifyFn: (accessToken: string, refreshToken: string, profile: AzureADStrategy.IProfile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (accessToken, refreshToken, profile, user): Promise<IAuthUser | null>

Parameters
Name Type
accessToken string
refreshToken string
profile AzureADStrategy.IProfile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:152


AzureAdSignUpFn

Ƭ AzureAdSignUpFn: (profile: AzureADStrategy.IProfile) => Promise<User & UserRelations | null>

Type declaration

▸ (profile): Promise<User & UserRelations | null>

Parameters
Name Type
profile AzureADStrategy.IProfile
Returns

Promise<User & UserRelations | null>

Defined in

services/authentication-service/src/providers/types.ts:148


CodeReaderFn

Ƭ CodeReaderFn: (token: string) => Promise<string>

Type declaration

▸ (token): Promise<string>

Parameters
Name Type
token string
Returns

Promise<string>

Defined in

services/authentication-service/src/providers/types.ts:114


CodeWriterFn

Ƭ CodeWriterFn: (token: string) => Promise<string>

Type declaration

▸ (token): Promise<string>

Parameters
Name Type
token string
Returns

Promise<string>

Defined in

services/authentication-service/src/providers/types.ts:113


CognitoPostVerifyFn

Ƭ CognitoPostVerifyFn: (profile: Cognito.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile Cognito.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:171


CognitoPreVerifyFn

Ƭ CognitoPreVerifyFn: (accessToken: string, refreshToken: string, profile: Cognito.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (accessToken, refreshToken, profile, user): Promise<IAuthUser | null>

Parameters
Name Type
accessToken string
refreshToken string
profile Cognito.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:164


CognitoSignUpFn

Ƭ CognitoSignUpFn: (profile: Cognito.Profile) => Promise<User & UserRelations | null>

Type declaration

▸ (profile): Promise<User & UserRelations | null>

Parameters
Name Type
profile Cognito.Profile
Returns

Promise<User & UserRelations | null>

Defined in

services/authentication-service/src/providers/types.ts:176


FacebookPostVerifyFn

Ƭ FacebookPostVerifyFn: (profile: FacebookStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile FacebookStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:92


FacebookPreVerifyFn

Ƭ FacebookPreVerifyFn: (accessToken: string, refreshToken: string, profile: FacebookStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (accessToken, refreshToken, profile, user): Promise<IAuthUser | null>

Parameters
Name Type
accessToken string
refreshToken string
profile FacebookStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:85


FacebookSignUpFn

Ƭ FacebookSignUpFn: (profile: FacebookStrategy.Profile) => Promise<User & UserRelations | null>

Type declaration

▸ (profile): Promise<User & UserRelations | null>

Parameters
Name Type
profile FacebookStrategy.Profile
Returns

Promise<User & UserRelations | null>

Defined in

services/authentication-service/src/providers/types.ts:81


ForgotPasswordHandlerFn

Ƭ ForgotPasswordHandlerFn: (dto: DataObject<ForgetPasswordResponseDto>) => Promise<unknown>

Type declaration

▸ (dto): Promise<unknown>

Parameters
Name Type
dto DataObject<ForgetPasswordResponseDto>
Returns

Promise<unknown>

Defined in

services/authentication-service/src/providers/types.ts:127


GooglePostVerifyFn

Ƭ GooglePostVerifyFn: (profile: GoogleStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile GoogleStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:40


GooglePreVerifyFn

Ƭ GooglePreVerifyFn: (accessToken: string, refreshToken: string, profile: GoogleStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (accessToken, refreshToken, profile, user): Promise<IAuthUser | null>

Parameters
Name Type
accessToken string
refreshToken string
profile GoogleStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:33


GoogleSignUpFn

Ƭ GoogleSignUpFn: (profile: GoogleStrategy.Profile) => Promise<User & UserRelations | null>

Type declaration

▸ (profile): Promise<User & UserRelations | null>

Parameters
Name Type
profile GoogleStrategy.Profile
Returns

Promise<User & UserRelations | null>

Defined in

services/authentication-service/src/providers/types.ts:29


InstagramPostVerifyFn

Ƭ InstagramPostVerifyFn: (profile: InstagramStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile InstagramStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:60


InstagramPreVerifyFn

Ƭ InstagramPreVerifyFn: (accessToken: string, refreshToken: string, profile: InstagramStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (accessToken, refreshToken, profile, user): Promise<IAuthUser | null>

Parameters
Name Type
accessToken string
refreshToken string
profile InstagramStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:53


InstagramSignUpFn

Ƭ InstagramSignUpFn: (profile: InstagramStrategy.Profile) => Promise<User & UserRelations | null>

Type declaration

▸ (profile): Promise<User & UserRelations | null>

Parameters
Name Type
profile InstagramStrategy.Profile
Returns

Promise<User & UserRelations | null>

Defined in

services/authentication-service/src/providers/types.ts:49


JWTSignerFn

Ƭ JWTSignerFn<T>: (payload: T, options: SignOptions) => Promise<string>

Type parameters

Name
T

Type declaration

▸ (payload, options): Promise<string>

Parameters
Name Type
payload T
options SignOptions
Returns

Promise<string>

Defined in

services/authentication-service/src/providers/types.ts:180


JWTVerifierFn

Ƭ JWTVerifierFn<T>: (token: string, options: VerifyOptions) => Promise<T>

Type parameters

Name
T

Type declaration

▸ (token, options): Promise<T>

Parameters
Name Type
token string
options VerifyOptions
Returns

Promise<T>

Defined in

services/authentication-service/src/providers/types.ts:184


JwtPayloadFn

Ƭ JwtPayloadFn: (user: IAuthUser, authClient: IAuthClient, tenantId?: string) => Promise<object>

Type declaration

▸ (user, authClient, tenantId?): Promise<object>

Parameters
Name Type
user IAuthUser
authClient IAuthClient
tenantId? string
Returns

Promise<object>

Defined in

services/authentication-service/src/providers/types.ts:121


KeyCloakPostVerifyFn

Ƭ KeyCloakPostVerifyFn: (profile: Keycloak.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile Keycloak.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:108


KeyCloakPreVerifyFn

Ƭ KeyCloakPreVerifyFn: (accessToken: string, refreshToken: string, profile: Keycloak.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (accessToken, refreshToken, profile, user): Promise<IAuthUser | null>

Parameters
Name Type
accessToken string
refreshToken string
profile Keycloak.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:101


KeyCloakSignUpFn

Ƭ KeyCloakSignUpFn: (profile: Keycloak.Profile) => Promise<IAuthUser | null>

Type declaration

▸ (profile): Promise<IAuthUser | null>

Parameters
Name Type
profile Keycloak.Profile
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:97


MfaCheckFn

Ƭ MfaCheckFn: (user: AuthUser) => Promise<boolean>

Type declaration

▸ (user): Promise<boolean>

Parameters
Name Type
user AuthUser
Returns

Promise<boolean>

Defined in

services/authentication-service/src/providers/types.ts:136


OtpFn

Ƭ OtpFn: (user: User) => Promise<OtpResponse>

Type declaration

▸ (user): Promise<OtpResponse>

Parameters
Name Type
user User
Returns

Promise<OtpResponse>

Defined in

services/authentication-service/src/providers/types.ts:140


OtpGenerateFn

Ƭ OtpGenerateFn: (secret: string) => Promise<string>

Type declaration

▸ (secret): Promise<string>

Parameters
Name Type
secret string
Returns

Promise<string>

Defined in

services/authentication-service/src/providers/types.ts:138


OtpSenderFn

Ƭ OtpSenderFn: (otp: string, user: User) => Promise<void>

Type declaration

▸ (otp, user): Promise<void>

Parameters
Name Type
otp string
user User
Returns

Promise<void>

Defined in

services/authentication-service/src/providers/types.ts:142


PasswordDecryptionFn

Ƭ PasswordDecryptionFn: (password: string) => Promise<string>

Type declaration

▸ (password): Promise<string>

Parameters
Name Type
password string
Returns

Promise<string>

Defined in

services/authentication-service/src/providers/types.ts:48


PreSignupFn

Ƭ PreSignupFn<T, S>: (request: SignupRequestDto<T>) => Promise<S>

Type parameters

Name
T
S

Type declaration

▸ (request): Promise<S>

Parameters
Name Type
request SignupRequestDto<T>
Returns

Promise<S>

Defined in

services/authentication-service/src/types.ts:34


RoleWithRelations

Ƭ RoleWithRelations: Role

Defined in

services/authentication-service/src/models/role.model.ts:63


SamlPostVerifyFn

Ƭ SamlPostVerifyFn: (profile: SamlStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile SamlStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:197


SamlPreVerifyFn

Ƭ SamlPreVerifyFn: (profile: SamlStrategy.Profile, user: IAuthUser | null) => Promise<IAuthUser | null>

Type declaration

▸ (profile, user): Promise<IAuthUser | null>

Parameters
Name Type
profile SamlStrategy.Profile
user IAuthUser | null
Returns

Promise<IAuthUser | null>

Defined in

services/authentication-service/src/providers/types.ts:192


SamlSignUpFn

Ƭ SamlSignUpFn: (profile: SamlStrategy.Profile) => Promise<User & UserRelations | null>

Type declaration

▸ (profile): Promise<User & UserRelations | null>

Parameters
Name Type
profile SamlStrategy.Profile
Returns

Promise<User & UserRelations | null>

Defined in

services/authentication-service/src/providers/types.ts:188


SignupTokenHandlerFn

Ƭ SignupTokenHandlerFn: (dto: DataObject<SignupRequestResponseDto>) => Promise<void>

Type declaration

▸ (dto): Promise<void>

Parameters
Name Type
dto DataObject<SignupRequestResponseDto>
Returns

Promise<void>

Defined in

services/authentication-service/src/providers/types.ts:144


TenantWithRelations

Ƭ TenantWithRelations: Tenant

Defined in

services/authentication-service/src/models/tenant.model.ts:76


UserCredentialsWithRelations

Ƭ UserCredentialsWithRelations: UserCredentials & UserCredentialsRelations

Defined in

services/authentication-service/src/models/user-credentials.model.ts:66


UserSignupFn

Ƭ UserSignupFn<T, S>: (model: T & LocalUserProfileDto, tokenInfo?: AnyObject) => Promise<S>

Type parameters

Name
T
S

Type declaration

▸ (model, tokenInfo?): Promise<S>

Parameters
Name Type
model T & LocalUserProfileDto
tokenInfo? AnyObject
Returns

Promise<S>

Defined in

services/authentication-service/src/types.ts:41


UserTenantWithRelations

Ƭ UserTenantWithRelations: UserTenant & UserTenantRelations

Defined in

services/authentication-service/src/models/user-tenant.model.ts:81


UserValidationFn

Ƭ UserValidationFn: (req: AuthRefreshTokenRequest, payload: AnyObject, signUpProvider: string, token?: string) => Promise<boolean>

Type declaration

▸ (req, payload, signUpProvider, token?): Promise<boolean>

Parameters
Name Type
req AuthRefreshTokenRequest
payload AnyObject
signUpProvider string
token? string
Returns

Promise<boolean>

Defined in

services/authentication-service/src/types.ts:35


UserWithRelations

Ƭ UserWithRelations: User & UserRelations

Defined in

services/authentication-service/src/models/user.model.ts:140

Variables

AuthCacheSourceName

Const AuthCacheSourceName: "AuthCache"

Defined in

services/authentication-service/src/types.ts:21


AuthDbSourceName

Const AuthDbSourceName: "AuthDB"

Defined in

services/authentication-service/src/types.ts:20


models

Const models: (typeof AuthClient | typeof AuthSecureClient | typeof User | typeof RefreshTokenRequest | typeof SignupRequestDto | typeof LoginActivity | typeof OtpCache | typeof Otp | typeof RefreshToken | typeof RevokedToken | typeof Role | typeof Tenant | typeof TenantConfig | typeof UserLevelPermission | typeof UserTenant | typeof UserCredentials | typeof UserLevelResource | typeof ForgetPasswordDto | typeof LocalUserProfileDto | typeof ResetPasswordWithClient | typeof SignupRequestResponseDto | typeof SignupRequest | typeof SignupWithTokenReponseDto)[]

Defined in

services/authentication-service/src/models/index.ts:56


repositories

Const repositories: (typeof LoginActivityRepository | typeof AuthClientRepository | typeof AuthSecureClientRepository | typeof OtpCacheRepository | typeof OtpRepository | typeof RefreshTokenRepository | typeof RevokedTokenRepository | typeof RoleRepository | typeof TenantRepository | typeof TenantConfigRepository | typeof UserLevelPermissionRepository | typeof UserTenantRepository | typeof UserRepository | typeof UserCredentialsRepository | typeof UserLevelResourceRepository)[]

Defined in

services/authentication-service/src/repositories/index.ts:37


services

Const services: (typeof LoginHelperService | typeof OtpService)[]

Defined in

services/authentication-service/src/services/index.ts:10