Fix authentication callback
This commit is contained in:
parent
570d146b21
commit
9147e6739f
2 changed files with 14 additions and 12 deletions
|
@ -48,6 +48,7 @@ type Callback struct {
|
||||||
type Provider struct {
|
type Provider struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
|
OriginalAuthURL string `json:"-"`
|
||||||
AuthURL string `json:"auth_url"`
|
AuthURL string `json:"auth_url"`
|
||||||
ClientID string `json:"client_id"`
|
ClientID string `json:"client_id"`
|
||||||
ClientSecret string `json:"-"`
|
ClientSecret string `json:"-"`
|
||||||
|
@ -67,7 +68,7 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Provider) setOicdProvider() (err error) {
|
func (p *Provider) setOicdProvider() (err error) {
|
||||||
p.openIDProvider, err = oidc.NewProvider(context.Background(), p.AuthURL)
|
p.openIDProvider, err = oidc.NewProvider(context.Background(), p.OriginalAuthURL)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,7 @@ func getProviderFromMap(pi map[string]interface{}) (provider *Provider, err erro
|
||||||
Name: pi["name"].(string),
|
Name: pi["name"].(string),
|
||||||
Key: k,
|
Key: k,
|
||||||
AuthURL: pi["authurl"].(string),
|
AuthURL: pi["authurl"].(string),
|
||||||
|
OriginalAuthURL: pi["authurl"].(string),
|
||||||
ClientSecret: pi["clientsecret"].(string),
|
ClientSecret: pi["clientsecret"].(string),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue