mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 17:55:17 -04:00
auth/index.ts: Refactor Gitlab & Dropbox middlewares
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
1353e61e87
commit
1903ba12af
2 changed files with 8 additions and 9 deletions
|
@ -6,8 +6,8 @@ import { User } from '../../models'
|
|||
import { FacebookMiddleware } from './facebook'
|
||||
import { TwitterMiddleware } from './twitter'
|
||||
import { GithubMiddleware } from './github'
|
||||
import gitlab from './gitlab'
|
||||
import dropbox from './dropbox'
|
||||
import { GitlabMiddleware } from './gitlab'
|
||||
import { DropboxMiddleware } from './dropbox'
|
||||
import google from './google'
|
||||
import ldap from './ldap'
|
||||
import saml from './saml'
|
||||
|
@ -46,8 +46,8 @@ passport.deserializeUser(function (id: string, done) {
|
|||
if (config.isFacebookEnable) AuthRouter.use(FacebookMiddleware.getMiddleware())
|
||||
if (config.isTwitterEnable) AuthRouter.use(TwitterMiddleware.getMiddleware())
|
||||
if (config.isGitHubEnable) AuthRouter.use(GithubMiddleware.getMiddleware())
|
||||
if (config.isGitLabEnable) AuthRouter.use(gitlab)
|
||||
if (config.isDropboxEnable) AuthRouter.use(dropbox)
|
||||
if (config.isGitLabEnable) AuthRouter.use(GitlabMiddleware.getMiddleware())
|
||||
if (config.isDropboxEnable) AuthRouter.use(DropboxMiddleware.getMiddleware())
|
||||
if (config.isGoogleEnable) AuthRouter.use(google)
|
||||
if (config.isLDAPEnable) AuthRouter.use(ldap)
|
||||
if (config.isSAMLEnable) AuthRouter.use(saml)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue