moved OAuth2Authenticator to auth package

This commit is contained in:
Philipp Wolfer 2023-12-10 14:17:49 +01:00
parent dd501df5c5
commit a59a542967
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
6 changed files with 41 additions and 21 deletions

View file

@ -37,7 +37,7 @@ func BuildRedirectURL(config *viper.Viper, backend string) (*url.URL, error) {
}
func Authenticate(service string, backend models.Backend, db storage.Database, config *viper.Viper) (bool, error) {
authenticator, needAuth := backend.(models.OAuth2Authenticator)
authenticator, needAuth := backend.(auth.OAuth2Authenticator)
if needAuth {
redirectURL, err := BuildRedirectURL(config, backend.Name())
if err != nil {