diff options
author | M.Dent <dentm42@dm42.net> | 2018-08-09 22:35:12 -0400 |
---|---|---|
committer | M.Dent <dentm42@dm42.net> | 2018-08-10 12:01:05 -0400 |
commit | 0b31c677f253907ee9a36e12ae51763b2d69a574 (patch) | |
tree | de755677f8edebeeb95d2d44f02dcd21b9a30d07 /Zotlabs/Identity/OAuth2Server.php | |
parent | 7890157f52378ec7a643e76e3b5c88fa23795d32 (diff) | |
download | volse-hubzilla-0b31c677f253907ee9a36e12ae51763b2d69a574.tar.gz volse-hubzilla-0b31c677f253907ee9a36e12ae51763b2d69a574.tar.bz2 volse-hubzilla-0b31c677f253907ee9a36e12ae51763b2d69a574.zip |
Fixes to OAuth2 connect-with-openid. Add zothash Claim. Add zotwebbie Claim.
Diffstat (limited to 'Zotlabs/Identity/OAuth2Server.php')
-rw-r--r-- | Zotlabs/Identity/OAuth2Server.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Identity/OAuth2Server.php b/Zotlabs/Identity/OAuth2Server.php index cbb4748fe..b747b95db 100644 --- a/Zotlabs/Identity/OAuth2Server.php +++ b/Zotlabs/Identity/OAuth2Server.php @@ -4,7 +4,7 @@ namespace Zotlabs\Identity; class OAuth2Server extends \OAuth2\Server { - public function __construct(OAuth2Storage $storage, $config = []) { + public function __construct(OAuth2Storage $storage, $config = null) { if(! is_array($config)) { $config = [ @@ -19,7 +19,8 @@ class OAuth2Server extends \OAuth2\Server { $this->addGrantType(new \OAuth2\GrantType\ClientCredentials($storage)); // Add the "Authorization Code" grant type (this is where the oauth magic happens) - $this->addGrantType(new \OAuth2\GrantType\AuthorizationCode($storage)); + // Need to use OpenID\GrantType to return id_token (see:https://github.com/bshaffer/oauth2-server-php/issues/443) + $this->addGrantType(new \OAuth2\OpenID\GrantType\AuthorizationCode($storage)); $keyStorage = new \OAuth2\Storage\Memory( [ 'keys' => [ |