mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
Move ProviderEnum and PassportProfile to web/auth/utils.ts
These two are directly related with auth stuff and seem to fit much better there. Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
4e7c82dc3b
commit
5852b45bdd
6 changed files with 30 additions and 31 deletions
|
@ -15,33 +15,9 @@ import {
|
|||
} from 'sequelize-typescript'
|
||||
import { generateAvatarURL } from '../letter-avatars'
|
||||
import { logger } from '../logger'
|
||||
import { PassportProfile, ProviderEnum } from '../web/auth/utils'
|
||||
import { Note } from './note'
|
||||
|
||||
// core
|
||||
|
||||
export enum ProviderEnum {
|
||||
facebook = 'facebook',
|
||||
twitter = 'twitter',
|
||||
github = 'github',
|
||||
gitlab = 'gitlab',
|
||||
dropbox = 'dropbox',
|
||||
google = 'google',
|
||||
ldap = 'ldap',
|
||||
oauth2 = 'oauth2',
|
||||
saml = 'saml',
|
||||
}
|
||||
|
||||
export type PassportProfile = {
|
||||
id: string;
|
||||
username: string;
|
||||
displayName: string;
|
||||
emails: string[];
|
||||
avatarUrl: string;
|
||||
profileUrl: string;
|
||||
provider: ProviderEnum;
|
||||
photos: { value: string }[];
|
||||
}
|
||||
|
||||
export class PhotoProfile {
|
||||
name: string
|
||||
photo: string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue