Skip to content
Snippets Groups Projects
Commit f0e198e7 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fixes for modules/authlinkedin

parent e82cd6d9
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,13 @@ class LinkedIn extends \SimpleSAML\Auth\Source ...@@ -23,8 +23,13 @@ class LinkedIn extends \SimpleSAML\Auth\Source
*/ */
const AUTHID = 'authlinkedin:AuthId'; const AUTHID = 'authlinkedin:AuthId';
/** @var string */
private $key; private $key;
/** @var string */
private $secret; private $secret;
/** @var string */
private $attributes; private $attributes;
...@@ -33,6 +38,7 @@ class LinkedIn extends \SimpleSAML\Auth\Source ...@@ -33,6 +38,7 @@ class LinkedIn extends \SimpleSAML\Auth\Source
* *
* @param array $info Information about this authentication source. * @param array $info Information about this authentication source.
* @param array $config Configuration. * @param array $config Configuration.
* @throws \Exception
*/ */
public function __construct($info, $config) public function __construct($info, $config)
{ {
...@@ -68,6 +74,7 @@ class LinkedIn extends \SimpleSAML\Auth\Source ...@@ -68,6 +74,7 @@ class LinkedIn extends \SimpleSAML\Auth\Source
* Documentation at: http://developer.linkedin.com/docs/DOC-1008 * Documentation at: http://developer.linkedin.com/docs/DOC-1008
* *
* @param array &$state Information about the current authentication. * @param array &$state Information about the current authentication.
* @return void
*/ */
public function authenticate(&$state) public function authenticate(&$state)
{ {
...@@ -104,6 +111,10 @@ class LinkedIn extends \SimpleSAML\Auth\Source ...@@ -104,6 +111,10 @@ class LinkedIn extends \SimpleSAML\Auth\Source
} }
/**
* @param array &$state
* @return void
*/
public function finalStep(&$state) public function finalStep(&$state)
{ {
$requestToken = $state['authlinkedin:requestToken']; $requestToken = $state['authlinkedin:requestToken'];
......
...@@ -23,6 +23,7 @@ if (array_key_exists('oauth_verifier', $_REQUEST)) { ...@@ -23,6 +23,7 @@ if (array_key_exists('oauth_verifier', $_REQUEST)) {
assert(array_key_exists(\SimpleSAML\Module\authlinkedin\Auth\Source\LinkedIn::AUTHID, $state)); assert(array_key_exists(\SimpleSAML\Module\authlinkedin\Auth\Source\LinkedIn::AUTHID, $state));
$sourceId = $state[\SimpleSAML\Module\authlinkedin\Auth\Source\LinkedIn::AUTHID]; $sourceId = $state[\SimpleSAML\Module\authlinkedin\Auth\Source\LinkedIn::AUTHID];
/** @var \SimpleSAML\Module\authlinkedin\Auth\Source\LinkedIn|null $source */
$source = \SimpleSAML\Auth\Source::getById($sourceId); $source = \SimpleSAML\Auth\Source::getById($sourceId);
if ($source === null) { if ($source === null) {
throw new \Exception('Could not find authentication source with id '.$sourceId); throw new \Exception('Could not find authentication source with id '.$sourceId);
......
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