-
Notifications
You must be signed in to change notification settings - Fork 70
/
types.ts
48 lines (41 loc) · 1.09 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) 2023 Sourcefuse Technologies
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
/* eslint-disable @typescript-eslint/naming-convention */
import {IServiceConfig} from '@sourceloop/core';
import {STRATEGY} from 'loopback4-authentication';
// sonarignore:start
export interface IAuthServiceConfig extends IServiceConfig {
//do nothing
}
// sonarignore:end
export const AuthDbSourceName = 'AuthDB';
export const AuthCacheSourceName = 'AuthCache';
export interface IMfaConfig {
secondFactor: STRATEGY;
}
export interface IAuthClientDTO {
// sonarignore:start
client_id: string;
client_secret: string;
// sonarignore:end
}
export interface ExternalTokens {
externalAuthToken?: string;
externalRefreshToken?: string;
}
export type FindAccountProviderFn = (
ctx: unknown,
sub: string,
token: unknown,
) => Promise<FindAccountResult>;
export interface FindAccountResult {
accountId: string;
claims: (
use: string,
scope: string,
claims: unknown,
rejected: Array<string>,
) => Promise<{[key: string]: unknown}>;
}