2 instantiations of TwoFactorResponse
Microsoft.AspNetCore.Identity (2)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
326
return TypedResults.Ok(new
TwoFactorResponse
IdentityEndpointsJsonSerializerContext.TwoFactorResponse.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = 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)
996
PopulateMetadataForEndpoint<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);
1005
var 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!);
1088
var 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)
260
accountGroup.MapPost("/2fa", async Task<Results<Ok<
TwoFactorResponse
>, ValidationProblem, NotFound>>
IdentityEndpointsJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
66
if (type == typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
))
IdentityEndpointsJsonSerializerContext.TwoFactorResponse.g.cs (31)
13
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
>? _TwoFactorResponse;
19
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
> TwoFactorResponse
22
get => _TwoFactorResponse ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
));
25
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
> Create_TwoFactorResponse(global::System.Text.Json.JsonSerializerOptions options)
27
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
> jsonTypeInfo))
29
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
>
35
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
39
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
>(options, objectInfo);
56
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
58
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).SharedKey,
66
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("SharedKey", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
81
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).RecoveryCodesLeft,
89
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("RecoveryCodesLeft", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
100
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
102
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).RecoveryCodes,
110
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("RecoveryCodes", InstanceMemberBindingFlags, null, typeof(string[]), global::System.Array.Empty<global::System.Type>(), null),
120
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
122
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).IsTwoFactorEnabled,
130
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("IsTwoFactorEnabled", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
141
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
143
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).IsMachineRemembered,
151
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("IsMachineRemembered", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
162
private void TwoFactorResponseSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
? value)
172
writer.WriteString(PropName_SharedKey, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).SharedKey);
173
writer.WriteNumber(PropName_RecoveryCodesLeft, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).RecoveryCodesLeft);
175
StringArraySerializeHandler(writer, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).RecoveryCodes);
176
writer.WriteBoolean(PropName_IsTwoFactorEnabled, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).IsTwoFactorEnabled);
177
writer.WriteBoolean(PropName_IsMachineRemembered, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).IsMachineRemembered);