forked from Mirrors/oauth2
Bug fix in upper-casing scopes
This commit is contained in:
parent
6881fee410
commit
f76f480589
|
@ -94,8 +94,8 @@ func (js jwtSource) Token() (*oauth2.Token, error) {
|
||||||
// Add scopes if they exist; If not, it defaults to app scopes
|
// Add scopes if they exist; If not, it defaults to app scopes
|
||||||
if scopes := js.conf.Scopes; scopes != nil {
|
if scopes := js.conf.Scopes; scopes != nil {
|
||||||
upperScopes := make([]string, len(scopes))
|
upperScopes := make([]string, len(scopes))
|
||||||
for _, k := range scopes {
|
for i, k := range scopes {
|
||||||
upperScopes = append(upperScopes, strings.ToUpper(k))
|
upperScopes[i] = strings.ToUpper(k)
|
||||||
}
|
}
|
||||||
v.Set("scope", strings.Join(upperScopes, "+"))
|
v.Set("scope", strings.Join(upperScopes, "+"))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue