Update statement to generate codeChallenge in AuthCodeGrantTest

This commit is contained in:
Erick Torres 2017-12-29 12:32:12 -05:00
parent b6d9835281
commit 01d21b2533

View File

@ -48,7 +48,7 @@ class AuthCodeGrantTest extends TestCase
{
$this->cryptStub = new CryptTraitStub;
$this->codeVerifier = rtrim(strtr(base64_encode(random_bytes(32)), '+/', '-_'), '=');
$this->codeChallenge = rtrim(strtr(base64_encode(hash('sha256',$this->codeVerifier, true)), '+/', '-_'), '=');
$this->codeChallenge = hash('sha256', strtr(rtrim(base64_encode($this->codeVerifier), '='), '+/', '-_'));
}
public function testGetIdentifier()