bshaffer / oauth2-server-php-docs

documentation for the oauth2-server-php library
231 stars 148 forks source link

openssl_verify returns 0 #75

Closed alfdc closed 7 years ago

alfdc commented 8 years ago

Hi I was able to successfully generate the JWT token and got the access token, following the code in https://bshaffer.github.io/oauth2-server-php-docs/overview/jwt-access-tokens/, openssl_verify keeps on returning 0 instead of 1, and I was not able to var_dump the jwt payload in the end.

rhadoo200 commented 8 years ago

Hello. I don't know if you figure it by now but here is what you need to do: in the original example replace $decoded_signature = base64_decode($signature); with $decoded_signature = base64_decode(strreplace(['-', ''], ['+', '/'], $signature));