Horje
How to decode Microsoft Local token in service Code Example
How to decode Microsoft Local token in service
// Getting Decoded Token from the HTTP context
// May very according to place where you are using it.
// You can use it in Controller/AttributeFilter/Middlerware.

var identity = HttpContext.User.Identity as ClaimsIdentity;

// Gets list of claims.
IEnumerable<Claim> claims = identity.Claims;

// Can find any value from claim by changing below code
var Name = claims.Where(x => x.Type == ClaimTypes.Name).ToArray();

// Do the next opertaion




Csharp

Related
winforms C# code cross thread operation is not valid Code Example winforms C# code cross thread operation is not valid Code Example
how to change all values in dictionary c# Code Example how to change all values in dictionary c# Code Example
set request size c# Code Example set request size c# Code Example
rename join table ef core Code Example rename join table ef core Code Example
select a whole row out of a 2d array C# Code Example select a whole row out of a 2d array C# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9