Merge branch 'oauth-proxy'

This commit is contained in:
Konstantin Haase 2012-09-27 16:15:02 +02:00
commit 3235bb8b53

View File

@ -126,13 +126,18 @@ class Travis::Api::App
private
def oauth_endpoint
proxy = Travis.config.oauth2.proxy
proxy ? File.join(proxy, request.fullpath) : url
end
def handshake
config = Travis.config.oauth2
endpoint = Addressable::URI.parse(config.authorization_server)
values = {
client_id: config.client_id,
scope: config.scope,
redirect_uri: url
redirect_uri: oauth_endpoint
}
if params[:code] and state_ok?(params[:state])