Skip to content

Latest commit

 

History

History

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

(N.B. this assumes python 3 is installed as python3.)

In subdirectorty jwt/python/generate:

  • Install dependencies using pip

pip3 install -r requirements.txt
  • Run

# generate an app token
python3 generate.py --key=path/to/private_key.pem --issuer-id=issuer-id

# generate a user token
python3 generate.py --key=path/to/private_key.pem --issuer-id=issuer-id --username=username
  • Example

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

Requirements/Dependencies

  • Python 3 version 3

  • pip version 3

  • PyJWT version >= 1.71

  • See also requirements.txt for subdependencies

(Use python -V or python3 -V to test your Python version.)