Return Oauth headers even if none scope was matched
If an endpoint specifies more than one scope and none of the scopes from access token matches, return oauth headers for the first of the scopes
This commit is contained in:
parent
cdabec540d
commit
d276cd5b32
|
@ -46,6 +46,9 @@ class Travis::Api::App
|
|||
end
|
||||
|
||||
if !result
|
||||
headers['X-OAuth-Scopes'] = scopes.map(&:to_s).join(',')
|
||||
headers['X-Accepted-OAuth-Scopes'] = names.first.to_s
|
||||
|
||||
if env['travis.access_token']
|
||||
pass { halt 403, "insufficient access" }
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user