OAuth2Strategy interface to abstract the details of the login flow

This allows implementing clients the deviate from the standard OAuth2 flow
This commit is contained in:
Philipp Wolfer 2023-11-23 14:41:31 +01:00
parent 780af98e1e
commit f447a259d4
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
6 changed files with 130 additions and 27 deletions

View file

@ -46,7 +46,7 @@ func Authenticate(service string, backend models.Backend, db storage.Database, c
if err != nil {
return auth, err
}
conf := authenticator.OAuth2Config(redirectURL)
conf := authenticator.OAuth2Strategy(redirectURL).Config()
tokenSource := NewDatabaseTokenSource(db, service, &conf, token)
authenticator.OAuth2Setup(tokenSource)
}