Merge pull request #697 from fkooman/fix-s256

Fix PKCE code verifier encoding to match specification
This commit is contained in:
Andrew Millington
2017-12-23 01:52:33 +00:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -767,7 +767,7 @@ class AuthCodeGrantTest extends TestCase
'user_id' => 123,
'scopes' => ['foo'],
'redirect_uri' => 'http://foo/bar',
'code_challenge' => urlencode(base64_encode(hash('sha256', 'foobar'))),
'code_challenge' => strtr(rtrim(base64_encode(hash('sha256', 'foobar')), '='), '+/', '-_'),
'code_challenge_method' => 'S256',
]
)