Compare commits
2 Commits
903dc45917
...
6999c11d50
Author | SHA1 | Date | |
---|---|---|---|
6999c11d50 | |||
063abcf9d1 |
@ -33,15 +33,8 @@ type LoginModel struct {
|
|||||||
|
|
||||||
// NewLoginModel constructor for LoginModel
|
// NewLoginModel constructor for LoginModel
|
||||||
func (app *Bouquins) NewLoginModel(req *http.Request) *LoginModel {
|
func (app *Bouquins) NewLoginModel(req *http.Request) *LoginModel {
|
||||||
var configured []OAuth2Provider
|
// TODO filter configured providers
|
||||||
for _, p := range Providers {
|
return &LoginModel{*app.NewModel("Authentification", "provider", req), Providers}
|
||||||
for _, provConf := range app.Conf.ProvidersConf {
|
|
||||||
if provConf.Name == p.Name() {
|
|
||||||
configured = append(configured, p)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return &LoginModel{*app.NewModel("Authentification", "provider", req), configured}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// OAuth2Provider allows to get a user from an OAuth2 token
|
// OAuth2Provider allows to get a user from an OAuth2 token
|
||||||
|
Loading…
Reference in New Issue
Block a user