Exemple #1
0
 /// <summary>
 /// Deserialzes JSON into a <see cref="T:System.IdentityModel.Tokens.JwtPayload" /> instance.
 /// </summary>
 /// <param name="jsonString">the JSON to deserialize.</param>
 /// <returns>an instance of <see cref="T:System.IdentityModel.Tokens.JwtPayload" />.</returns>
 /// <remarks>use <see cref="P:System.IdentityModel.Tokens.JsonExtensions.Deserializer" /> to customize JSON serialization.</remarks>
 public static JwtPayload Deserialize(string jsonString)
 {
     return(JsonExtensions.DeserializeJwtPayload(jsonString));
 }
Exemple #2
0
 /// <summary>Serializes this instance to JSON.</summary>
 /// <returns>this instance as JSON.</returns>
 /// <remarks>use <see cref="P:System.IdentityModel.Tokens.JsonExtensions.Serializer" /> to customize JSON serialization.</remarks>
 public virtual string SerializeToJson()
 {
     return(JsonExtensions.SerializeToJson((object)this));
 }
Exemple #3
0
 /// <summary>
 /// Deserializes Base64UrlEncoded JSON into a <see cref="T:System.IdentityModel.Tokens.JwtPayload" /> instance.
 /// </summary>
 /// <param name="base64UrlEncodedJsonString">base64url encoded JSON to deserialize.</param>
 /// <returns>an instance of <see cref="T:System.IdentityModel.Tokens.JwtPayload" />.</returns>
 /// <remarks>use <see cref="P:System.IdentityModel.Tokens.JsonExtensions.Deserializer" /> to customize JSON serialization.</remarks>
 public static JwtPayload Base64UrlDeserialize(string base64UrlEncodedJsonString)
 {
     return(JsonExtensions.DeserializeJwtPayload(Base64UrlEncoder.Decode(base64UrlEncodedJsonString)));
 }
Exemple #4
0
 /// <summary>
 /// Deserialzes JSON into a <see cref="T:System.IdentityModel.Tokens.JwtHeader" /> instance.
 /// </summary>
 /// <param name="jsonString"> the JSON to deserialize.</param>
 /// <returns>an instance of <see cref="T:System.IdentityModel.Tokens.JwtHeader" />.</returns>
 /// <remarks>use <see cref="P:System.IdentityModel.Tokens.JsonExtensions.Deserializer" /> to customize JSON serialization.</remarks>
 public static JwtHeader Deserialize(string jsonString)
 {
     return(JsonExtensions.DeserializeJwtHeader(jsonString));
 }