1 | import { HttpException } from '@nestjs/common';
|
2 | import { Configuration, Context, IUser } from '..';
|
3 | import { CredentialRepository, LoginCredentials } from './auth.repository';
|
4 | import { UserService } from './user.service';
|
5 | import { AuthCallbacks } from "./auth.callbacks";
|
6 | export declare class AuthenticationFailedException extends HttpException {
|
7 | constructor(message: string);
|
8 | }
|
9 | export declare function hashPassword(password: string): Promise<string>;
|
10 | export declare class AuthService {
|
11 | private readonly authRepository;
|
12 | private readonly userService;
|
13 | private readonly configurationProvider;
|
14 | private readonly authCallbacks;
|
15 | private readonly logger;
|
16 | constructor(authRepository: CredentialRepository, userService: UserService<IUser>, configurationProvider: Configuration, authCallbacks: AuthCallbacks);
|
17 | validateUser(context: Context, username: string, password: string): Promise<IUser>;
|
18 | validateFakeLogin(context: Context, secret: string | string[] | undefined, email: string, name: string, roles: string[], orgId: string, props: any): Promise<IUser>;
|
19 | validateUserGoogle(context: Context, inputProfile: object): Promise<IUser>;
|
20 | validateUserSaml(context: Context, profile: SimpleUserProfile): Promise<IUser>;
|
21 | validateUserOidc(context: Context, profile: any, overwriteCredentials: boolean): Promise<IUser>;
|
22 | private buildUserRoles;
|
23 | private buildUserProperties;
|
24 | validateUserAuth0(context: Context, email: string, name: string, orgId: string, roles: string[], props: any): Promise<IUser>;
|
25 | createAccount(context: Context, email: string, password: string, account: string): Promise<LoginCredentials>;
|
26 | private validateOrCreateExternalAuthAccount;
|
27 | private loadUserAndCheckEnabled;
|
28 | private validateUserEnabled;
|
29 | private getAccountByEmail;
|
30 | private toName;
|
31 | }
|
32 | export interface SimpleUserProfile {
|
33 | email: string;
|
34 | firstName?: string;
|
35 | lastName?: string;
|
36 | }
|