Joined August 2015
·

Getulio Jr

Brasil
·
·

Now I need to agree with you: a try and catch on UnexpectedValueException solve the problem with elegance =D
Kudos!

@rmcdaniel I know that... but donĀ“t you think its better jwt_helper.php return a simple invalid message (when token is invalid) instead of give us a fatal error?

A little problem...

Using this:
$token = JWT::decode($POST['token'], 'secretserver_key');
echo $token->id;

If you change/forge the token (somebody can do it), jwthelper.php will return a Fatal Error and expose your "secretserver_key" on error message. Have you tried?

Achievements
1 Karma
0 Total ProTip Views