You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Letssayyouwanttoaugmentthecurrent `ClaimsPrincipal` byaddingclaimstoit, andyouhavetodoiton `OnTokenValidated `, howeveryoudon't want to lose this `UnauthorizedAccessException` check existing in the event. To do so, on your `Startup.cs` you would have:
361
+
Let's say you want to augment the current `ClaimsPrincipal` by adding claims to it, and you have to do it on `OnTokenValidated `, however you don'twanttolosethis `UnauthorizedAccessException` checkexistingintheevent. Todoso, onyour `Startup.cs` youwouldhave:
You can learn more about the tokens by looking at the following articles in MSAL.NET's conceptual documentation:
380
380
381
381
- The [Authorization code flow](https://aka.ms/msal-net-authorization-code), which is used, after the user signed-in with Open ID Connect, in order to get a token and cache it for a later use. See [TokenAcquisition L 107](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/blob/f99e913cc032e16c59b748241111e97108e87918/Extensions/TokenAcquisition.cs#L107) for details of this code
382
-
- [AcquireTokenSilent](https://aka.ms/msal-net-acquiretokensilent), which is used by the controller to get an access token for the downstream API. See [TokenAcquisition L 168](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/blob/f99e913cc032e16c59b748241111e97108e87918/Extensions/TokenAcquisition.cs#L168) for details of this code
382
+
- [AcquireTokenSilent](https://aka.ms/msal-net-acquiretokensilent), which is used by the controller to get an access token for the downstream API. See [TokenAcquisition L 168](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/blob/f99e913cc032e16c59b748241111e97108e87918/Extensions/TokenAcquisition.cs#L168) for details of this code
0 commit comments