-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
If the Idaas\OpenID\ResponseTypes\BearerTokenResponse is not passed to the AuthorizationServer constructor as the responseType the $result will be a League\OAuth2\Server\ResponseTypes\BearerTokenResponse and not a Idaas\OpenID\ResponseTypes\BearerTokenResponse (The @var is also wrong):
openid-connect-server/src/Grant/AuthCodeGrant.php
Lines 176 to 179 in ea20f8f
| /** | |
| * @var BearerTokenResponse $result | |
| */ | |
| $result = parent::respondToAccessTokenRequest($request, $responseType, $accessTokenTTL); |
The League BearerTokenResponse does not have the setIdToken method, so it crashes here:
| $result->setIdToken($idToken); |
This should be probably fixed in the README and a proper type-assert should be added to the AuthCodeGrant.
// Setup the authorization server
$server = new \League\OAuth2\Server\AuthorizationServer(
$clientRepository,
$accessTokenRepository,
$scopeRepository,
$privateKey,
- $encryptionKey
+ $encryptionKey,
+ new \Idaas\OpenID\ResponseTypes\BearerTokenResponse,
);Metadata
Metadata
Assignees
Labels
No labels