Validate Azure AD v2 id_token
How to validate the id_token value received from Azure AD v2.0 authentication response?
As you can see from the previous tutorials, you can easily decode the "id_token" value received from Azure AD authentication response using a simple PHP script.
After decoding, you can get all information about the end user from the body component, and trust it without any validation.
But, since the "id_token" is included in the authentication response delivered over the public Internet, you should not trust it and perform a number validation steps:
1. Data structure validation.
2. Data attributes validation.
3. Timestamp attributes validation. This will prevent someone to repost the authentication response to your server script at a later time.
4. "nonce" protection and validation. This will prevent someone to repost the authentication response again immediately.
5. Signature validation. This is to ensure the entire authentication response message has not been modified by someone else. See next tutorial on how to perform "id_token" signature validation.
2019-03-27, 209👍, 0💬
Where to find tutorials on Python programming language? I want to learn Python. Here is a large coll...
Where to find tutorials on introduction of EPUB 2.0.1 Specification? Here is a list of tutorials to ...
dev.FYIcenter.com is a Website for software developer looking for software development technologies,...
How to see more EPUB 2.0 metadata list with Calibre? You can follow this tutorial to view EPUB 2.0 m...
Why Do You Need to Filter Out Empty Files in PHP? When you are processing uploaded files, you need t...