/// <summary>Initializes a new instance of the <see cref="JwtMember"/> class.</summary> public JwtMember(JsonEncodedText memberName, string value) { if (value == null) { ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); } Type = JwtValueKind.String; Value = value; Name = memberName; }
internal static Exception CreateInvalidOperationException_NotSupportedJsonType(JwtValueKind type) => new InvalidOperationException($"The type {type} is not supported.");
internal static void ThrowInvalidOperationException_NotSupportedJsonType(JwtValueKind type) => throw CreateInvalidOperationException_NotSupportedJsonType(type);
private static Exception CreateJwtDescriptorException_HeaderMustBeOfType(JsonEncodedText utf8Name, JwtValueKind type) => new JwtDescriptorException($"The header parameter '{utf8Name}' must be of type {type}.");
/// <summary>Initializes a new instance of the <see cref="JwtMember"/> class.</summary> public JwtMember(JsonEncodedText memberName, ulong value) { Type = JwtValueKind.UInt64; Value = value; Name = memberName; }
/// <summary>Initializes a new instance of the <see cref="JwtMember"/> class.</summary> public JwtMember(JsonEncodedText memberName, uint value) { Type = JwtValueKind.UInt32; Value = value; Name = memberName; }
/// <summary>Initializes a new instance of the <see cref="JwtMember"/> class.</summary> public JwtMember(JsonEncodedText memberName, object?[] value) { Type = JwtValueKind.Array; Value = value; Name = memberName; }
public static bool IsInteger(this JwtValueKind kind) { return(((uint)kind & 0x80) != 0x00); }
/// <summary>Initializes a new instance of the <see cref="JwtMember"/> class.</summary> public JwtMember(JsonEncodedText memberName, float value) { Type = JwtValueKind.Float; Value = value; Name = memberName; }
/// <summary>Initializes a new instance of the <see cref="JwtMember"/> class.</summary> public JwtMember(JsonEncodedText memberName, bool value) { Type = value ? JwtValueKind.True : JwtValueKind.False; Value = value; Name = memberName; }
/// <summary>Initializes a new instance of the <see cref="JwtMember"/> class.</summary> public JwtMember(JsonEncodedText memberName, double value) { Type = JwtValueKind.Double; Value = value; Name = memberName; }
public static bool IsStringOrArray(this JwtValueKind kind) { return(((uint)kind & 0x0c) != 0x00); }
public static bool IsFloat(this JwtValueKind kind) { return(((uint)kind & 0x40) != 0x00); }
internal static void ThrowJwtDescriptorException_ClaimMustBeOfType(JsonEncodedText utf8Name, JwtValueKind type) => throw CreateJwtDescriptorException_ClaimMustBeOfType(utf8Name, type);
/// <summary>Initializes a new instance of the <see cref="JwtMember"/> class.</summary> public JwtMember(JsonEncodedText memberName, JsonEncodedText value) { Type = JwtValueKind.JsonEncodedString; Value = value; Name = memberName; }
private static Exception CreateJwtDescriptorException_ClaimMustBeOfType(JsonEncodedText utf8Name, JwtValueKind type) => new JwtDescriptorException($"The claim '{utf8Name}' must be of type {type}.");
public static bool IsNumber(this JwtValueKind kind) { return(((uint)kind & 0xc0) != 0x00); }