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:88


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:81


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:77


Auth0PostVerifyFn

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

Type declaration

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

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

Promise<IAuthUser | null>

Defined in

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


Auth0PreVerifyFn

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

Type declaration

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

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

Promise<IAuthUser | null>

Defined in

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


Auth0SignUpFn

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

Type declaration

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

Parameters
Name Type
profile Auth0Strategy.Profile
Returns

Promise<User & UserRelations | null>

Defined in

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


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:143


AuthenticationProviderFn

Ƭ AuthenticationProviderFn: (accessToken: string, req?: AuthRefreshTokenRequest, payload?: AnyObject) => Promise<boolean>

Type declaration

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

Parameters
Name Type
accessToken string
req? AuthRefreshTokenRequest
payload? AnyObject
Returns

Promise<boolean>

Defined in

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


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:171


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:164


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:160


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:126


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:125


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:183


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:176


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:188


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:104


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:97


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:93


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:139


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:41


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:34


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:30


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:72


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:65


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:61


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:192


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:196


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:133


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:120


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:113


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:109


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:148


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:152


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:150


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:154


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:51


PasswordHashingFn

Ƭ PasswordHashingFn: (password?: string, key?: string) => Promise<string>

Type declaration

▸ (password?, key?): Promise<string>

Parameters
Name Type
password? string
key? string
Returns

Promise<string>

Defined in

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


PasswordVerifyFn

Ƭ PasswordVerifyFn: (plainPassword: string, hashedPassword: string, key?: string) => Promise<boolean>

Type declaration

▸ (plainPassword, hashedPassword, key?): Promise<boolean>

Parameters
Name Type
plainPassword string
hashedPassword string
key? string
Returns

Promise<boolean>

Defined in

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


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:209


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:204


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:200


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:156


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 ActiveUsersFilter | typeof AuthClient | typeof AuthSecureClient | typeof SignupRequestDto | typeof User | typeof RefreshTokenRequest | 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 JwtKeys | typeof LocalUserProfileDto | typeof ResetPasswordWithClient | typeof SignupRequestResponseDto | typeof SignupRequest | typeof SignupWithTokenReponseDto)[]

Defined in

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


repositories

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

Defined in

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


services

Const services: (typeof ActiveUserFilterBuilderService | typeof IdpLoginService | typeof LoginActivityHelperService | typeof LoginHelperService | typeof OtpService)[]

Defined in

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