Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function generateBearerToken($header, $payload, $key) {
- $token_signature = hash_hmac(
- 'SHA256',
- true64encode($header) .
- "." .
- true64encode($payload),
- $key,
- true
- );
- return true64encode($header) .
- "." .
- true64encode($payload) .
- "." .
- true64encode($token_signature);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement