21 lines
1.0 KiB
Go Template
21 lines
1.0 KiB
Go Template
{{ define "auth-cli" }}
|
|
{{ if .CLIDone }}
|
|
<p role="status">{{ T "auth.cli_done" }}</p>
|
|
{{ else }}
|
|
<p>{{ T "auth.cli_warning" }}</p>
|
|
<p><strong>{{ .CLIOrigin }}</strong></p>
|
|
{{ if .CLILogin }}
|
|
<a class="auth-provider-button" href="{{ .CLILogin }}">{{ T "auth.login_oidc" }}</a>
|
|
{{ else }}
|
|
<p>{{ T "auth.cli_account" }}: <strong>{{ .CLIUsername }}</strong></p>
|
|
<p>{{ T "auth.cli_access" }}</p>
|
|
<form class="auth-form" method="post" action="/_/auth/cli/verify">
|
|
<input type="hidden" name="request" value="{{ .CLIRequest }}">
|
|
<input type="hidden" name="csrf" value="{{ .CLICSRF }}">
|
|
<label>{{ T "auth.cli_code" }}<input name="user_code" autocomplete="off" autocapitalize="characters" spellcheck="false" maxlength="9" required autofocus placeholder="ABCD-1234"></label>
|
|
<button class="auth-primary" type="submit" name="decision" value="approve">{{ T "auth.cli_approve" }}</button>
|
|
<button class="auth-secondary" type="submit" name="decision" value="deny" formnovalidate>{{ T "auth.cli_deny" }}</button>
|
|
</form>
|
|
{{ end }}{{ end }}
|
|
{{ end }}
|