mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-21 18:54:39 +02:00
Remove generateScopes function and set Scopes to an empty array in OAuth authentication
This commit is contained in:
parent
6a27fbedda
commit
2de3030fb7
@ -60,7 +60,7 @@ func CreateOauthAuth(ctx *context.APIContext) {
|
||||
OpenIDConnectAutoDiscoveryURL: form.ProviderAutoDiscoveryURL,
|
||||
CustomURLMapping: nil,
|
||||
IconURL: form.ProviderIconURL,
|
||||
Scopes: generateScopes(),
|
||||
Scopes: []string{},
|
||||
RequiredClaimName: form.RequiredClaimName,
|
||||
RequiredClaimValue: form.RequiredClaimValue,
|
||||
SkipLocalTwoFA: form.SkipLocal2FA,
|
||||
@ -146,7 +146,7 @@ func EditOauthAuth(ctx *context.APIContext) {
|
||||
OpenIDConnectAutoDiscoveryURL: form.ProviderAutoDiscoveryURL,
|
||||
CustomURLMapping: nil,
|
||||
IconURL: form.ProviderIconURL,
|
||||
Scopes: generateScopes(),
|
||||
Scopes: []string{},
|
||||
RequiredClaimName: form.RequiredClaimName,
|
||||
RequiredClaimValue: form.RequiredClaimValue,
|
||||
SkipLocalTwoFA: form.SkipLocal2FA,
|
||||
@ -267,17 +267,3 @@ func SearchOauthAuth(ctx *context.APIContext) {
|
||||
ctx.SetTotalCountHeader(maxResults)
|
||||
ctx.JSON(http.StatusOK, &results)
|
||||
}
|
||||
|
||||
// ??? todo: what should I do here?
|
||||
func generateScopes() []string {
|
||||
var scopes []string
|
||||
|
||||
// for _, s := range strings.Split(form.Oauth2Scopes, ",") {
|
||||
// s = strings.TrimSpace(s)
|
||||
// if s != "" {
|
||||
// scopes = append(scopes, s)
|
||||
// }
|
||||
// }
|
||||
|
||||
return scopes
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user