Merge branch 'master' of github.com:travis-ci/travis-api
This commit is contained in:
commit
5271f21d3c
|
@ -126,13 +126,18 @@ class Travis::Api::App
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def oauth_endpoint
|
||||||
|
proxy = Travis.config.oauth2.proxy
|
||||||
|
proxy ? File.join(proxy, request.fullpath) : url
|
||||||
|
end
|
||||||
|
|
||||||
def handshake
|
def handshake
|
||||||
config = Travis.config.oauth2
|
config = Travis.config.oauth2
|
||||||
endpoint = Addressable::URI.parse(config.authorization_server)
|
endpoint = Addressable::URI.parse(config.authorization_server)
|
||||||
values = {
|
values = {
|
||||||
client_id: config.client_id,
|
client_id: config.client_id,
|
||||||
scope: config.scope,
|
scope: config.scope,
|
||||||
redirect_uri: url
|
redirect_uri: oauth_endpoint
|
||||||
}
|
}
|
||||||
|
|
||||||
if params[:code] and state_ok?(params[:state])
|
if params[:code] and state_ok?(params[:state])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user