Using Laravel Lumen to provide an API to Validate Azure B2C Token.
This app will validate the Azure User Token , A JWT contains three segments, which are separated by the . character. The first segment is known as the header, the second as the body, and the third as the signature. The signature segment can be used to validate the authenticity of the token so that it can be trusted by your app.
Tokens issued by Azure AD are signed using industry standard asymmetric encryption algorithms, such as RS256. The header of the JWT contains information about the key and encryption method used to sign the token:
1 The claim itself. to ensure that the claim is authenticated and matches your Azure B2C AD configuratiion
2 The Token JWT Signature as All Azure B2C AD tokens are signed, you need to authenticate the signiture to ensure the origin of the toke is Microsoft Azure AD.
url = the location of your applicatio ninstallation
method = POST
"headers": {
"Accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded"
},
"policy_name": "Your Policy Name that You Set Up In Azure B2C AD",
"client_id": "Your Client Id",
"tenant": "The Tenant Name",
"token": "The Token You want to Validate"
{
"token": "valid"
}
{
"token": "not_valid"
}
Thank you for considering contributing !
If you discover a security vulnerability within this application , Report in the issues section.
open-sourced software licensed under the MIT license.