authentification OpenID Connect (Keycloak) : flux authorization code, state signé, validation du token ID via JWKS, provisioning automatique des utilisateurs
This commit is contained in:
1 parent
51bbb45b32
commit
bedb6c98e7
15 files changed
+1057
-23
No files matched your search
+4
-1
@@ -3,6 +3,7 @@ package cmd
|
||||
import (
|
||||
"time"
|
||||
|
||||
"trankilou.fr/lassistanoque/backend/internal/adapter/auth/oidc"
|
||||
"trankilou.fr/lassistanoque/backend/internal/adapter/auth/password"
|
||||
"trankilou.fr/lassistanoque/backend/internal/adapter/database"
|
||||
"trankilou.fr/lassistanoque/backend/internal/adapter/file"
|
||||
@@ -71,6 +72,8 @@ func getAuthenticators() map[string]auth.Authenticator {
|
||||
authenticators := make(map[string]auth.Authenticator)
|
||||
pwdAuth := password.NewPasswordAuthenticator(GetTokenManager(), db.UserRepository())
|
||||
authenticators["password"] = pwdAuth
|
||||
oidcAuth := oidc.NewOIDCAuthenticator(GetTokenManager(), db.OIDCProviderRepository(), db.UserRepository())
|
||||
authenticators["oidc"] = oidcAuth
|
||||
return authenticators
|
||||
}
|
||||
|
||||
@@ -98,7 +101,7 @@ func GetStorageService() *storage.Service {
|
||||
|
||||
func GetAuthService() *auth.Service {
|
||||
if authService == nil {
|
||||
authService = auth.NewService(db.SettingsRepository(), db.UserRepository(), getAuthenticators())
|
||||
authService = auth.NewService(db.SettingsRepository(), db.UserRepository(), db.OIDCProviderRepository(), GetTokenManager(), getAuthenticators())
|
||||
}
|
||||
return authService
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user