FIX: Looks like `token_params` weren't being attached properly

This commit is contained in:
Robin Ward 2015-11-11 13:00:40 -05:00
parent 1961285970
commit 27ff369904
1 changed files with 1 additions and 5 deletions

View File

@ -20,14 +20,10 @@ class OAuth2BasicAuthenticator < ::Auth::OAuth2Authenticator
authorize_url: SiteSetting.oauth2_authorize_url,
token_url: SiteSetting.oauth2_token_url
}
opts[:token_params] = {headers: {'Authorization' => basic_auth_header }}
}
end
def build_access_token
options.token_params.merge!(:headers => {'Authorization' => basic_auth_header })
super
end
def basic_auth_header
"Basic " + Base64.strict_encode64("#{SiteSetting.oauth2_client_id}:#{SiteSetting.oauth2_client_secret}")
end