I have a accesToken from azure AD. I need to validate them in python. How can I do that?
One of the workaround is to use PyJWT and cryptography dependancies (Because it contains binary dependencies, it must be created and packaged for the target operating system) to support the RS256 algorithm.
pip install pyjwt cryptography requests
Then use the App ID to validate the token.
import jwt
app_id = 'd31a4d20-6c4a-1a40-b74d-1a3d461bb3d8'
access_token = 'XXXX'
token_header = jwt.get_unverified_header(access_token)
For more information you can refer
REFERENCES:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.