|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Microsoft.AspNetCore.Authentication.JwtBearer.Tools
{
internal sealed partial class JwtSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>? _Jwt;
/// <summary>
/// Defines the source generated JSON serialization contract metadata for a given type.
/// </summary>
#nullable disable annotations // Marking the property type as nullable-oblivious.
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt> Jwt
#nullable enable annotations
{
get => _Jwt ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt> Create_Jwt(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt((string)args[0], (string)args[1], (string)args[2], (string)args[3], (global::System.DateTimeOffset)args[4], (global::System.DateTimeOffset)args[5], (global::System.DateTimeOffset)args[6], (string)args[7]),
PropertyMetadataInitializer = _ => JwtPropInit(options),
ConstructorParameterMetadataInitializer = JwtCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string), typeof(string), typeof(global::System.DateTimeOffset), typeof(global::System.DateTimeOffset), typeof(global::System.DateTimeOffset), typeof(string)}, modifiers: null),
SerializeHandler = JwtSerializeHandler,
PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
TypeClassifierFactory = null,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] JwtPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[11];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Id,
Setter = static (obj, value) => __set_Jwt_Id((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Id",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Id", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Scheme,
Setter = static (obj, value) => __set_Jwt_Scheme((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Scheme",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Scheme", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info1);
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Name,
Setter = static (obj, value) => __set_Jwt_Name((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Name",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info2);
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Audience,
Setter = static (obj, value) => __set_Jwt_Audience((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Audience",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Audience", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info3);
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).NotBefore,
Setter = static (obj, value) => __set_Jwt_NotBefore((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "NotBefore",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("NotBefore", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info4);
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Expires,
Setter = static (obj, value) => __set_Jwt_Expires((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Expires",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Expires", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info5);
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Issued,
Setter = static (obj, value) => __set_Jwt_Issued((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Issued",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Issued", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info6);
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Token,
Setter = static (obj, value) => __set_Jwt_Token((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Token",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Token", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info7);
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IEnumerable<string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Scopes,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Scopes = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Scopes",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Scopes", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IEnumerable<string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IEnumerable<string>>(options, info8);
var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IEnumerable<string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Roles,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).Roles = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Roles",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("Roles", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IEnumerable<string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IEnumerable<string>>(options, info9);
var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IDictionary<string, string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).CustomClaims,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)obj).CustomClaims = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "CustomClaims",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt).GetProperty("CustomClaims", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IDictionary<string, string>>(options, info10);
return properties;
}
// Intentionally not a static method because we create a delegate to it. Invoking delegates to instance
// methods is almost as fast as virtual calls. Static methods need to go through a shuffle thunk.
private void JwtSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_Id, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Id);
writer.WriteString(PropName_Scheme, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Scheme);
writer.WriteString(PropName_Name, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Name);
writer.WriteString(PropName_Audience, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Audience);
writer.WriteString(PropName_NotBefore, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).NotBefore);
writer.WriteString(PropName_Expires, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Expires);
writer.WriteString(PropName_Issued, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Issued);
writer.WriteString(PropName_Token, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Token);
writer.WritePropertyName(PropName_Scopes);
IEnumerableStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Scopes);
writer.WritePropertyName(PropName_Roles);
IEnumerableStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).Roles);
writer.WritePropertyName(PropName_CustomClaims);
IDictionaryStringStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt)value).CustomClaims);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] JwtCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "Id",
ParameterType = typeof(string),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "Scheme",
ParameterType = typeof(string),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "Name",
ParameterType = typeof(string),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "Audience",
ParameterType = typeof(string),
Position = 3,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
new()
{
Name = "NotBefore",
ParameterType = typeof(global::System.DateTimeOffset),
Position = 4,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "Expires",
ParameterType = typeof(global::System.DateTimeOffset),
Position = 5,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "Issued",
ParameterType = typeof(global::System.DateTimeOffset),
Position = 6,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "Token",
ParameterType = typeof(string),
Position = 7,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = true,
},
};
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Id")]
private static extern void __set_Jwt_Id(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Scheme")]
private static extern void __set_Jwt_Scheme(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Name")]
private static extern void __set_Jwt_Name(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Audience")]
private static extern void __set_Jwt_Audience(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_NotBefore")]
private static extern void __set_Jwt_NotBefore(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Expires")]
private static extern void __set_Jwt_Expires(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Issued")]
private static extern void __set_Jwt_Issued(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, global::System.DateTimeOffset value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Token")]
private static extern void __set_Jwt_Token(global::Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Jwt obj, string value);
}
}
|