master
ブランチ master
LittleBeast / view / twofactorsetup.maron
3.3 KB、86行 生 Blame 履歴
1{@ include(common/header) @}
2 <h1 class="paragraph">二段階認証({{ $s->username }})</h1>
3{@ if ($error) @}
4 <div class="errormes">
5 {{ $error }}
6 </div>
7{@ endif @}
8{@ if ($message) @}
9 <p class="paragraph">{{ $message }}</p>
10{@ endif @}
11{@ if ($s->enabled) @}
12 <p class="paragraph">
13 二段階認証は有効です。ログインの時に、パスワードの後で認証アプリのコードを入力します。
14 </p>
15
16 <form action="/profile/{{ $s->username }}/2fa" method="POST">
17 <input type="hidden" name="csrf_token" value="{{ $csrf }}" />
18 <input type="hidden" name="action" value="disable" />
19 <table>
20 <tbody>
21 <tr>
22 <td><label for="password">{{ $s->self ? 'パスワード' : '管理者のパスワード' }}:</label></td>
23 <td><input type="password" id="password" name="password" autocomplete="current-password" /></td>
24 </tr>
25{@ if ($s->self) @}
26 <tr>
27 <td><label for="code">コード:</label></td>
28 <td><input type="text" id="code" name="code" value="" inputmode="numeric" maxlength="7" autocomplete="one-time-code" /></td>
29 </tr>
30{@ endif @}
31 <tr>
32 <td></td>
33 <td><button>二段階認証を無効にする</button></td>
34 </tr>
35 </tbody>
36 </table>
37 </form>
38{@ elif ($s->self) @}
39 <p class="paragraph">
40 認証アプリでQRコードを読み取るか、パスワードマネージャーに秘密鍵を登録して、表示された6桁のコードを入力して下さい。
41 </p>
42
43 <p class="paragraph"><img src="/profile/{{ $s->username }}/2fa/qr" alt="二段階認証のQRコード" /></p>
44
45 <table>
46 <tbody>
47 <tr>
48 <td><label for="secret">秘密鍵:</label></td>
49 <td>
50 <code>{{ $secretGroups }}</code><br />
51 <input type="text" id="secret" value="{{ $s->secret }}" size="40" readonly="readonly" />
52 </td>
53 </tr>
54 <tr>
55 <td>種類:</td>
56 <td>TOTP(時間)、SHA-1、6桁、30秒</td>
57 </tr>
58 <tr>
59 <td><label for="uri">URI:</label></td>
60 <td><input type="text" id="uri" value="{{ $s->uri }}" size="60" readonly="readonly" /></td>
61 </tr>
62 </tbody>
63 </table>
64
65 <form action="/profile/{{ $s->username }}/2fa" method="POST">
66 <input type="hidden" name="csrf_token" value="{{ $csrf }}" />
67 <input type="hidden" name="action" value="enable" />
68 <table>
69 <tbody>
70 <tr>
71 <td><label for="code">コード:</label></td>
72 <td><input type="text" id="code" name="code" value="" inputmode="numeric" maxlength="7" autocomplete="one-time-code" /></td>
73 </tr>
74 <tr>
75 <td></td>
76 <td><button>有効にする</button></td>
77 </tr>
78 </tbody>
79 </table>
80 </form>
81{@ else @}
82 <p class="paragraph">二段階認証は有効ではありません(本人だけが有効に出来ます)。</p>
83{@ endif @}
84
85 <p class="paragraph"><a href="/profile/{{ $s->username }}/edit">プロフィールの編集に戻る</a></p>
86{@ include(common/footer) @}