Fix incorrect variable reference

This commit is contained in:
Andrew Millington 2018-08-12 20:29:39 +01:00
parent d07b5a4a03
commit 04807a1e2a
No known key found for this signature in database
GPG Key ID: 077754CA23023F4F

View File

@ -49,6 +49,14 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
$this->refreshTokenTTL = new \DateInterval('P1M');
}
/**
* Disable the requirement for a code challenge for public clients.
*/
public function disableCodeChallengeForPublicClients()
{
$this->requireCodeChallengeForPublicClients = false;
}
/**
* Respond to an access token request.
*
@ -185,7 +193,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
);
// @codeCoverageIgnoreEnd
}
} else if ($this->$requireCodeChallengeForPublicClients && !$client->isConfidential()) {
} else if ($this->requireCodeChallengeForPublicClients && !$client->isConfidential()) {
throw OAuthServerException::invalidRequest('code_challenge', 'Code challenge must be provided for public clients');
}