2 instantiations of TwoFactorResponse
Microsoft.AspNetCore.Identity (2)
_generated\13\IdentityEndpointsJsonSerializerContext.TwoFactorResponse.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse(){ SharedKey = (string)args[0], RecoveryCodesLeft = (int)args[1], IsTwoFactorEnabled = (bool)args[2], IsMachineRemembered = (bool)args[3] },
IdentityApiEndpointRouteBuilderExtensions.cs (1)
326return TypedResults.Ok(new TwoFactorResponse
52 references to TwoFactorResponse
Microsoft.AspNetCore.Identity (52)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (3)
996PopulateMetadataForEndpoint<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>>(methodInfo, options.EndpointBuilder); 1005var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest arg1, global::System.IServiceProvider arg2) => throw null!); 1088var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest arg1, global::System.IServiceProvider arg2) => throw null!);
_generated\13\IdentityEndpointsJsonSerializerContext.TwoFactorResponse.g.cs (41)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>? _TwoFactorResponse; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse> TwoFactorResponse 22get => _TwoFactorResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse> Create_TwoFactorResponse(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse> 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), 41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>(options, objectInfo); 58DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 60Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).SharedKey, 61Setter = static (obj, value) => __set_TwoFactorResponse_SharedKey((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj, value!), 68AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("SharedKey", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 81DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 83Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).RecoveryCodesLeft, 84Setter = static (obj, value) => __set_TwoFactorResponse_RecoveryCodesLeft((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj, value!), 91AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("RecoveryCodesLeft", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null), 102DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 104Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).RecoveryCodes, 105Setter = static (obj, value) => __set_TwoFactorResponse_RecoveryCodes((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj, value!), 112AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("RecoveryCodes", InstanceMemberBindingFlags, null, typeof(string[]), global::System.Array.Empty<global::System.Type>(), null), 122DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 124Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).IsTwoFactorEnabled, 125Setter = static (obj, value) => __set_TwoFactorResponse_IsTwoFactorEnabled((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj, value!), 132AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("IsTwoFactorEnabled", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), 143DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 145Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).IsMachineRemembered, 146Setter = static (obj, value) => __set_TwoFactorResponse_IsMachineRemembered((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj, value!), 153AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("IsMachineRemembered", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), 164private void TwoFactorResponseSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse? value) 174writer.WriteString(PropName_SharedKey, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).SharedKey); 175writer.WriteNumber(PropName_RecoveryCodesLeft, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).RecoveryCodesLeft); 177StringArraySerializeHandler(writer, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).RecoveryCodes); 178writer.WriteBoolean(PropName_IsTwoFactorEnabled, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).IsTwoFactorEnabled); 179writer.WriteBoolean(PropName_IsMachineRemembered, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).IsMachineRemembered); 224private static extern void __set_TwoFactorResponse_SharedKey(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse obj, string value); 226private static extern void __set_TwoFactorResponse_RecoveryCodesLeft(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse obj, int value); 228private static extern void __set_TwoFactorResponse_RecoveryCodes(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse obj, string[] value); 230private static extern void __set_TwoFactorResponse_IsTwoFactorEnabled(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse obj, bool value); 232private static extern void __set_TwoFactorResponse_IsMachineRemembered(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse obj, bool value);
_generated\18\IdentityEndpointsJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
66if (type == typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse))
Data\IdentityEndpointsJsonSerializerContext.cs (1)
17[JsonSerializable(typeof(TwoFactorResponse))]
Data\LoginRequest.cs (1)
30/// An optional two-factor recovery code from <see cref="TwoFactorResponse.RecoveryCodes"/>.
Data\TwoFactorRequest.cs (4)
20/// The two-factor code derived from the <see cref="TwoFactorResponse.SharedKey"/>. This is only required if <see cref="Enable"/> is set to <see langword="true"/>. 25/// An optional <see cref="bool"/> to reset the <see cref="TwoFactorResponse.SharedKey"/> to a new random value if <see langword="true"/>. 31/// An optional <see cref="bool"/> to reset the <see cref="TwoFactorResponse.RecoveryCodes"/> to new random values if <see langword="true"/>. 32/// <see cref="TwoFactorResponse.RecoveryCodes"/> will be empty unless they are reset or two-factor was enabled for the first time.
IdentityApiEndpointRouteBuilderExtensions.cs (1)
260accountGroup.MapPost("/2fa", async Task<Results<Ok<TwoFactorResponse>, ValidationProblem, NotFound>>