Tools, FAQ, Tutorials:
Decode Azure AD v2 id_token
How to decode the id_token value received from Azure AD v2.0 authentication response?
✍: FYIcenter.com
According to the "RFC 7519 - JWT (JSON Web Token)" standard,
the "id_token" value received from Azure AD authentication response should be
decoded as below:
Here is an example of PHP script, openID_receiver.php, that decodes all 3 components of the "id_token" value received in the Authentication Response:
<html><body><pre> <?php $id_token = $_REQUEST["id_token"]; $parts = explode(".", $id_token); $header = $parts[0]; $header = str_replace('/','_',$header); $header = str_replace('+','-',$header); $header = json_decode(base64_decode($header)); echo json_encode($header,JSON_PRETTY_PRINT); # ready to retrieve header attributes $body = $parts[1]; $body = str_replace('/','_',$body); $body = str_replace('+','-',$body); $body = json_decode(base64_decode($body)); echo json_encode($body,JSON_PRETTY_PRINT); # ready to retrieve body attributes $signature = $parts[2]; $signature = str_replace('/','_',$signature); $signature = str_replace('+','-',$signature); $signature = base64_decode($signature); # ready for signature validation ?> </pre></body></html>
Â
⇒ Azure AD v2 id_token Decoded Example
⇠Build Implicit Flow with Azure AD v2
⇑⇑ OpenID Tutorials
2019-04-03, 1138👍, 0💬
Popular Posts:
What is test testing area for? The testing area is provided to allow visitors to post testing commen...
How to add a new operation to an API on the Publisher Dashboard of an Azure API Management Service? ...
What is EPUB 2.0 Metadata "dc:creator" and "dc:contributor" elements? EPUB 2.0 Metadata "dc:creator"...
How to create Hello-3.1.epub with WinRAR? I have all required files to create Hello-3.1.epub. To cre...
How to use the JSON to XML Conversion Tool at utilities-online.info? If you want to try the JSON to ...