initial commit
This commit is contained in:
11
Walkthroughs/JWT/example5.py
Normal file
11
Walkthroughs/JWT/example5.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import jwt
|
||||
|
||||
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHSoarRoLvgAk4O41RE0w6lj2e7TDTbFk62WvIdJFo/aSLX/x9oc3PDqJ0Qu1x06/8PubQbCSLfWUyM7Dk0+irzb/VpWAurSh+hUvqQCkHmH9mrWpMqs5/L+rluglPEPhFwdL5yWk5kS7rZMZz7YaoYXwI7Ug4Es4iYbf6+UV0sudGwc3HrQ5uGUfOpmixUO0ZgTUWnrfMUpy2dFbZp7puQS6T8b5EJPpLY+iojMb/rbPB34NrvJKU1F84tfvY8xtg3HndTNPyNWp7EOsujKZIxKF5/RdW+Qf9jjBMvsbjfCo0LiNVjpotiLPVuslsEWun+LogxR+fxLiUehSBb8ip"
|
||||
|
||||
payload = {
|
||||
"username" : "user",
|
||||
"admin" : 0
|
||||
}
|
||||
|
||||
access_token = jwt.encode(payload, public_key, algorithm="HS256")
|
||||
print(access_token)
|
||||
Reference in New Issue
Block a user