Skip to content
Snippets Groups Projects
Commit 3972068c authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Added support for redirecting back to callback url at the OAuth Authorize endpoint

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1649 44740490-163a-0410-bde0-09ae8108e29a
parent ebf438e7
No related branches found
No related tags found
No related merge requests found
......@@ -33,16 +33,23 @@ $attributes = $session->getAttributes();
$store->authorize($requestToken, $attributes);
$t = new SimpleSAML_XHTML_Template($config, 'oauth:authorized.php');
$t->data['header'] = '{status:header_saml20_sp}';
$t->data['remaining'] = $session->remainingTime();
$t->data['sessionsize'] = $session->getSize();
$t->data['attributes'] = $attributes;
$t->data['logouturl'] = SimpleSAML_Utilities::selfURLNoQuery() . '?logout';
$t->data['icon'] = 'bino.png';
$t->show();
if (isset($_REQUEST['oauth_callback'])) {
SimpleSAML_Utilities::redirect($_REQUEST['oauth_callback']);
} else {
$t = new SimpleSAML_XHTML_Template($config, 'oauth:authorized.php');
$t->data['header'] = '{status:header_saml20_sp}';
$t->data['remaining'] = $session->remainingTime();
$t->data['sessionsize'] = $session->getSize();
$t->data['attributes'] = $attributes;
$t->data['logouturl'] = SimpleSAML_Utilities::selfURLNoQuery() . '?logout';
$t->data['icon'] = 'bino.png';
$t->show();
}
......
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