2 instantiations of TwoFactorResponse
Microsoft.AspNetCore.Identity (2)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
326return TypedResults.Ok(new TwoFactorResponse
IdentityEndpointsJsonSerializerContext.TwoFactorResponse.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse(){ SharedKey = (string)args[0], RecoveryCodesLeft = (int)args[1], RecoveryCodes = (string[])args[2], IsTwoFactorEnabled = (bool)args[3], IsMachineRemembered = (bool)args[4] },
42 references to TwoFactorResponse
Microsoft.AspNetCore.Identity (42)
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.
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!);
IdentityApiEndpointRouteBuilderExtensions.cs (1)
260accountGroup.MapPost("/2fa", async Task<Results<Ok<TwoFactorResponse>, ValidationProblem, NotFound>>
IdentityEndpointsJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
66if (type == typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse))
IdentityEndpointsJsonSerializerContext.TwoFactorResponse.g.cs (31)
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), 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>(options, objectInfo); 56DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 58Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).SharedKey, 66AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("SharedKey", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 79DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 81Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).RecoveryCodesLeft, 89AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("RecoveryCodesLeft", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null), 100DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 102Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).RecoveryCodes, 110AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("RecoveryCodes", InstanceMemberBindingFlags, null, typeof(string[]), global::System.Array.Empty<global::System.Type>(), null), 120DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 122Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).IsTwoFactorEnabled, 130AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("IsTwoFactorEnabled", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), 141DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse), 143Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)obj).IsMachineRemembered, 151AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse).GetProperty("IsMachineRemembered", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), 162private void TwoFactorResponseSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse? value) 172writer.WriteString(PropName_SharedKey, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).SharedKey); 173writer.WriteNumber(PropName_RecoveryCodesLeft, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).RecoveryCodesLeft); 175StringArraySerializeHandler(writer, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).RecoveryCodes); 176writer.WriteBoolean(PropName_IsTwoFactorEnabled, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).IsTwoFactorEnabled); 177writer.WriteBoolean(PropName_IsMachineRemembered, ((global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse)value).IsMachineRemembered);