2019-04-21 14:54:32 +00:00
|
|
|
package main
|
|
|
|
|
2019-04-21 17:36:28 +00:00
|
|
|
import (
|
2019-04-21 17:55:52 +00:00
|
|
|
"github.com/Luzifer/nginx-sso/plugins/auth/crowd"
|
2019-04-21 17:36:28 +00:00
|
|
|
"github.com/Luzifer/nginx-sso/plugins/auth/google"
|
2019-04-21 17:55:52 +00:00
|
|
|
"github.com/Luzifer/nginx-sso/plugins/auth/ldap"
|
2019-04-22 22:39:02 +00:00
|
|
|
"github.com/Luzifer/nginx-sso/plugins/auth/oidc"
|
2019-04-21 17:55:52 +00:00
|
|
|
"github.com/Luzifer/nginx-sso/plugins/auth/simple"
|
|
|
|
"github.com/Luzifer/nginx-sso/plugins/auth/token"
|
|
|
|
auth_yubikey "github.com/Luzifer/nginx-sso/plugins/auth/yubikey"
|
2019-04-21 17:36:28 +00:00
|
|
|
"github.com/Luzifer/nginx-sso/plugins/mfa/duo"
|
|
|
|
"github.com/Luzifer/nginx-sso/plugins/mfa/totp"
|
|
|
|
mfa_yubikey "github.com/Luzifer/nginx-sso/plugins/mfa/yubikey"
|
|
|
|
)
|
2019-04-21 14:54:32 +00:00
|
|
|
|
|
|
|
func registerModules() {
|
2019-12-28 13:12:18 +00:00
|
|
|
// Start with very simple, local auth providers as they are cheap
|
|
|
|
// in their execution and therefore if they are used nginx-sso
|
|
|
|
// can process far more requests than through the other providers
|
2019-06-14 22:17:16 +00:00
|
|
|
registerAuthenticator(simple.New(cookieStore))
|
2019-12-28 13:12:18 +00:00
|
|
|
registerAuthenticator(token.New())
|
|
|
|
|
|
|
|
// Afterwards utilize the more expensive remove providers
|
2019-04-21 17:55:52 +00:00
|
|
|
registerAuthenticator(crowd.New())
|
|
|
|
registerAuthenticator(ldap.New(cookieStore))
|
2019-04-21 14:54:32 +00:00
|
|
|
registerAuthenticator(google.New(cookieStore))
|
2019-04-22 22:39:02 +00:00
|
|
|
registerAuthenticator(oidc.New(cookieStore))
|
2019-04-21 17:55:52 +00:00
|
|
|
registerAuthenticator(auth_yubikey.New(cookieStore))
|
2019-04-21 17:36:28 +00:00
|
|
|
|
|
|
|
registerMFAProvider(duo.New())
|
|
|
|
registerMFAProvider(totp.New())
|
|
|
|
registerMFAProvider(mfa_yubikey.New())
|
2019-04-21 14:54:32 +00:00
|
|
|
}
|