Skip to content
Snippets Groups Projects
Commit 64126794 authored by Andjelko Horvat's avatar Andjelko Horvat
Browse files

oauth: proper building of authorize URL (related to #587).

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3294 44740490-163a-0410-bde0-09ae8108e29a
parent 71d02cef
No related branches found
No related tags found
No related merge requests found
...@@ -88,10 +88,11 @@ class sspmod_oauth_Consumer { ...@@ -88,10 +88,11 @@ class sspmod_oauth_Consumer {
} }
public function getAuthorizeRequest($url, $requestToken, $redirect = TRUE, $callback = NULL) { public function getAuthorizeRequest($url, $requestToken, $redirect = TRUE, $callback = NULL) {
$authorizeURL = $url . '?oauth_token=' . $requestToken->key; $params = array('oauth_token' => $requestToken->key);
if ($callback) { if ($callback) {
$authorizeURL .= '&oauth_callback=' . urlencode($callback); $params['oauth_callback'] = $callback;
} }
$authorizeURL = SimpleSAML_Utilities::addURLparameter($url, $params);
if ($redirect) { if ($redirect) {
SimpleSAML_Utilities::redirect($authorizeURL); SimpleSAML_Utilities::redirect($authorizeURL);
exit; exit;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment