2 instantiations of TwoFactorResponse
Microsoft.AspNetCore.Identity (2)
_generated\13\IdentityEndpointsJsonSerializerContext.TwoFactorResponse.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = 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)
326
return TypedResults.Ok(new
TwoFactorResponse
52 references to TwoFactorResponse
Microsoft.AspNetCore.Identity (52)
_generated\0\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!);
_generated\13\IdentityEndpointsJsonSerializerContext.TwoFactorResponse.g.cs (41)
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),
41
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
>(options, objectInfo);
58
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
60
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).SharedKey,
61
Setter = static (obj, value) => __set_TwoFactorResponse_SharedKey((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj, value!),
68
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("SharedKey", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
81
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
83
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).RecoveryCodesLeft,
84
Setter = static (obj, value) => __set_TwoFactorResponse_RecoveryCodesLeft((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj, value!),
91
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("RecoveryCodesLeft", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
102
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
104
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).RecoveryCodes,
105
Setter = static (obj, value) => __set_TwoFactorResponse_RecoveryCodes((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj, value!),
112
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("RecoveryCodes", InstanceMemberBindingFlags, null, typeof(string[]), global::System.Array.Empty<global::System.Type>(), null),
122
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
124
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).IsTwoFactorEnabled,
125
Setter = static (obj, value) => __set_TwoFactorResponse_IsTwoFactorEnabled((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj, value!),
132
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("IsTwoFactorEnabled", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
143
DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
),
145
Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj).IsMachineRemembered,
146
Setter = static (obj, value) => __set_TwoFactorResponse_IsMachineRemembered((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)obj, value!),
153
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
).GetProperty("IsMachineRemembered", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
164
private void TwoFactorResponseSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
? value)
174
writer.WriteString(PropName_SharedKey, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).SharedKey);
175
writer.WriteNumber(PropName_RecoveryCodesLeft, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).RecoveryCodesLeft);
177
StringArraySerializeHandler(writer, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).RecoveryCodes);
178
writer.WriteBoolean(PropName_IsTwoFactorEnabled, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).IsTwoFactorEnabled);
179
writer.WriteBoolean(PropName_IsMachineRemembered, ((global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
)value).IsMachineRemembered);
224
private static extern void __set_TwoFactorResponse_SharedKey(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
obj, string value);
226
private static extern void __set_TwoFactorResponse_RecoveryCodesLeft(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
obj, int value);
228
private static extern void __set_TwoFactorResponse_RecoveryCodes(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
obj, string[] value);
230
private static extern void __set_TwoFactorResponse_IsTwoFactorEnabled(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
obj, bool value);
232
private static extern void __set_TwoFactorResponse_IsMachineRemembered(global::Microsoft.AspNetCore.Identity.Data.
TwoFactorResponse
obj, bool value);
_generated\18\IdentityEndpointsJsonSerializerContext.GetJsonTypeInfo.g.cs (1)
66
if (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)
260
accountGroup.MapPost("/2fa", async Task<Results<Ok<
TwoFactorResponse
>, ValidationProblem, NotFound>>