Exemple #1
0
 /// <summary>
 /// Adds well-known claim to the JWT.
 /// </summary>
 /// <param name="name">Well-known claim name</param>
 /// <param name="value">Claim value</param>
 /// <returns>Current builder instance</returns>
 public JwtBuilder AddClaim(ClaimName name, string value) =>
 AddClaim(name.GetPublicClaimName(), value);
Exemple #2
0
 /// <summary>
 /// Adds well-known claim to the JWT.
 /// </summary>
 public static JwtBuilder AddClaim(this JwtBuilder builder, ClaimName name, object value) =>
 builder.AddClaim(name.GetPublicClaimName(), value);
 public static T GetValue <T>(this IIdentity identity, ClaimName claimName)
 {
     return(identity.GetValue <T>(claimName.GetPublicClaimName()));
 }
Exemple #4
0
 public JwtBuilder AddClaim(ClaimName name, object value) => AddClaim(name.GetPublicClaimName(), value);