Skip to content

Latest commit

 

History

History

php

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

MIT License

See the main README for general information.

Generate (JWT generation sample)

Generates/mints a JWT and prints it to shell’s standard output.

Installation and Usage

In subdirectorty jwt/php/generate:

composer install
  • Run

# generate an app token
php generate.php -k path/to/private_key.pem -i issuer-id

# generate an user token
php generate.php -k path/to/private_key.pem -i issuer-id -u username
  • Example

php generate.php -k /home/secured/private_key.pem -i f4d3dc80-885cbe1f-5f2b-4c74-0097-39dc59ae751c -u sbMem5c758c42bb1d12

Requirements

(Use php -v to test your PHP version.)