~edwargix/git.sr.ht

beb2f86a521271110342194e317c1fc5a4b23e6d — Drew DeVault 5 years ago e191cdf
API: permit more kinds of "*" OAuth scopes
1 files changed, 1 insertions(+), 1 deletions(-)

M api/auth/auth.go
M api/auth/auth.go => api/auth/auth.go +1 -1
@@ 238,7 238,7 @@ Expected 'Authorization: Bearer <token>'`, http.StatusForbidden)
				return
			}

			if scopes != "*" {
			if scopes != "*" && scopes != "*:read" && scopes != "*:write" {
				authError(w, "Presently, OAuth authentication to the GraphQL API is only supported for OAuth tokens with all permissions, namely '*'.", http.StatusForbidden)
				return
			}