added auth/oauth2.ts

added oauth2 to ProviderEnum

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
Philip Molares 2020-04-13 15:45:29 +02:00 committed by David Mehren
parent 287148f1e8
commit 5a1a25dda4
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB
5 changed files with 103 additions and 109 deletions

View file

@ -11,9 +11,9 @@ import { DropboxMiddleware } from './dropbox'
import { GoogleMiddleware } from './google'
import { LdapMiddleware } from './ldap'
import { SamlMiddleware } from './saml'
import oauth2 from './oauth2'
import { OAuth2Middleware } from './oauth2'
import { EmailMiddleware } from './email'
import {OPenIDMiddleware } from './openid'
import { OPenIDMiddleware } from './openid'
const AuthRouter = Router()
@ -51,7 +51,7 @@ if (config.isDropboxEnable) AuthRouter.use(DropboxMiddleware.getMiddleware())
if (config.isGoogleEnable) AuthRouter.use(GoogleMiddleware.getMiddleware())
if (config.isLDAPEnable) AuthRouter.use(LdapMiddleware.getMiddleware())
if (config.isSAMLEnable) AuthRouter.use(SamlMiddleware.getMiddleware())
if (config.isOAuth2Enable) AuthRouter.use(oauth2)
if (config.isOAuth2Enable) AuthRouter.use(OAuth2Middleware.getMiddleware())
if (config.isEmailEnable) AuthRouter.use(EmailMiddleware.getMiddleware())
if (config.isOpenIDEnable) AuthRouter.use(OPenIDMiddleware.getMiddleware())