Skip to content

Commit

Permalink
Support latest version of JWT plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
marioshtika committed Sep 23, 2022
1 parent a987bbb commit ff40afd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/AppPresser_User.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ private static function generateToken($user)
);

if (class_exists('Jwt_Auth')) {
return JWT::encode($token, $secretKey);
return JWT::encode(
apply_filters('jwt_auth_token_before_sign', $token, $user),
$secretKey,
apply_filters('jwt_auth_algorithm', 'HS256')
);
} else {
return null;
}
Expand Down

0 comments on commit ff40afd

Please sign in to comment.