Add groups claim
This commit is contained in:
parent
653521ed9f
commit
0235ceaa79
@ -38,6 +38,7 @@ type TokenClaims struct {
|
|||||||
Picture string `json:"picture"`
|
Picture string `json:"picture"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
EmailVerified bool `json:"email_verified"`
|
EmailVerified bool `json:"email_verified"`
|
||||||
|
Groups []string `json:"groups"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func Authenticate(p *ProviderConfig) (Result, error) {
|
func Authenticate(p *ProviderConfig) (Result, error) {
|
||||||
@ -68,7 +69,7 @@ func Authenticate(p *ProviderConfig) (Result, error) {
|
|||||||
ClientSecret: p.ClientSecret,
|
ClientSecret: p.ClientSecret,
|
||||||
Endpoint: provider.Endpoint(),
|
Endpoint: provider.Endpoint(),
|
||||||
RedirectURL: redirectURL,
|
RedirectURL: redirectURL,
|
||||||
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
|
Scopes: []string{oidc.ScopeOpenID, "profile", "email", "groups"},
|
||||||
}
|
}
|
||||||
|
|
||||||
stateData := make([]byte, 32)
|
stateData := make([]byte, 32)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user