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

make it configurable which auth source to use when authorizing a OAuth request

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2096 44740490-163a-0410-bde0-09ae8108e29a
parent 0e289e44
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
require_once(dirname(dirname(__FILE__)) . '/libextinc/OAuth.php');
$oauthconfig = SimpleSAML_Configuration::getOptionalConfig('module_oauth.php');
if(!array_key_exists('oauth_token', $_REQUEST)) {
throw new Exception('Required URL parameter [oauth_token] is missing.');
}
......@@ -22,7 +24,7 @@ $server->add_signature_method($plaintext_method);
$config = SimpleSAML_Configuration::getInstance();
$session = SimpleSAML_Session::getInstance();
$as = 'saml2';
$as = $oauthconfig->getString('auth');
if (!$session->isValid($as)) {
SimpleSAML_Auth_Default::initLogin($as, SimpleSAML_Utilities::selfURL());
}
......
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