main
Last change
on this file was 2aea0fd, checked in by ElenaMoskova <elena.moskova99@…>, 4 months ago |
init commit Elena
|
-
Property mode
set to
100644
|
File size:
1.8 KB
|
Line | |
---|
1 | // Licensed to the .NET Foundation under one or more agreements.
|
---|
2 | // The .NET Foundation licenses this file to you under the MIT license.
|
---|
3 | #nullable disable
|
---|
4 |
|
---|
5 | using Microsoft.AspNetCore.Identity;
|
---|
6 | using Microsoft.AspNetCore.Mvc;
|
---|
7 | using Microsoft.AspNetCore.Mvc.RazorPages;
|
---|
8 | using Microsoft.Extensions.Logging;
|
---|
9 |
|
---|
10 | namespace PostgreSqlDotnetCore.Areas.Identity.Pages.Account.Manage
|
---|
11 | {
|
---|
12 | /// <summary>
|
---|
13 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
14 | /// directly from your code. This API may change or be removed in future releases.
|
---|
15 | /// </summary>
|
---|
16 | public class ShowRecoveryCodesModel : PageModel
|
---|
17 | {
|
---|
18 | /// <summary>
|
---|
19 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
20 | /// directly from your code. This API may change or be removed in future releases.
|
---|
21 | /// </summary>
|
---|
22 | [TempData]
|
---|
23 | public string[] RecoveryCodes { get; set; }
|
---|
24 |
|
---|
25 | /// <summary>
|
---|
26 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
27 | /// directly from your code. This API may change or be removed in future releases.
|
---|
28 | /// </summary>
|
---|
29 | [TempData]
|
---|
30 | public string StatusMessage { get; set; }
|
---|
31 |
|
---|
32 | /// <summary>
|
---|
33 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
34 | /// directly from your code. This API may change or be removed in future releases.
|
---|
35 | /// </summary>
|
---|
36 | public IActionResult OnGet()
|
---|
37 | {
|
---|
38 | if (RecoveryCodes == null || RecoveryCodes.Length == 0)
|
---|
39 | {
|
---|
40 | return RedirectToPage("./TwoFactorAuthentication");
|
---|
41 | }
|
---|
42 |
|
---|
43 | return Page();
|
---|
44 | }
|
---|
45 | }
|
---|
46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.