/// <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);
/// <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())); }
public JwtBuilder AddClaim(ClaimName name, object value) => AddClaim(name.GetPublicClaimName(), value);