Introduce support for 3rd-party auth (OAuth2 & LDAP)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -74,4 +74,13 @@ export interface IConfig {
|
||||
};
|
||||
federating: boolean;
|
||||
version: string;
|
||||
auth: {
|
||||
ldap: boolean;
|
||||
oauthProviders: IOAuthProvider[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IOAuthProvider {
|
||||
id: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
@@ -9,15 +9,11 @@ export enum ICurrentUserRole {
|
||||
}
|
||||
|
||||
export interface ICurrentUser {
|
||||
id: number;
|
||||
id: string;
|
||||
email: string;
|
||||
isLoggedIn: boolean;
|
||||
role: ICurrentUserRole;
|
||||
participations: Paginate<IParticipant>;
|
||||
defaultActor: IPerson;
|
||||
drafts: IEvent[];
|
||||
settings: IUserSettings;
|
||||
locale: string;
|
||||
defaultActor?: IPerson;
|
||||
}
|
||||
|
||||
export interface IUser extends ICurrentUser {
|
||||
@@ -25,6 +21,22 @@ export interface IUser extends ICurrentUser {
|
||||
confirmationSendAt: Date;
|
||||
actors: IPerson[];
|
||||
disabled: boolean;
|
||||
participations: Paginate<IParticipant>;
|
||||
drafts: IEvent[];
|
||||
settings: IUserSettings;
|
||||
locale: string;
|
||||
provider?: string;
|
||||
}
|
||||
|
||||
export enum IAuthProvider {
|
||||
LDAP = "ldap",
|
||||
GOOGLE = "google",
|
||||
DISCORD = "discord",
|
||||
GITHUB = "github",
|
||||
KEYCLOAK = "keycloak",
|
||||
FACEBOOK = "facebook",
|
||||
GITLAB = "gitlab",
|
||||
TWITTER = "twitter",
|
||||
}
|
||||
|
||||
export enum INotificationPendingParticipationEnum {
|
||||
|
||||
@@ -6,4 +6,6 @@ export enum LoginError {
|
||||
USER_NOT_CONFIRMED = "User account not confirmed",
|
||||
USER_DOES_NOT_EXIST = "No user with this email was found",
|
||||
USER_EMAIL_PASSWORD_INVALID = "Impossible to authenticate, either your email or password are invalid.",
|
||||
LOGIN_PROVIDER_ERROR = "Error with Login Provider",
|
||||
LOGIN_PROVIDER_NOT_FOUND = "Login Provider not found",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user