mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
moved OAuth2Authenticator to auth package
This commit is contained in:
parent
dd501df5c5
commit
a59a542967
6 changed files with 41 additions and 21 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue