tulip/red-pages/oauth-authorize.go.html

43 lines
1.7 KiB
HTML
Raw Normal View History

2023-09-06 22:20:09 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{.ServiceName}}</title>
2023-12-17 16:03:13 +00:00
<link rel="stylesheet" href="/theme/style.css">
2023-09-06 22:20:09 +01:00
</head>
<body>
<header>
<h1>{{.ServiceName}}</h1>
2023-09-06 22:20:09 +01:00
</header>
<main>
<form method="POST" action="/authorize">
<div>The application {{.AppName}} wants to access your account ({{.User.Name}}). It requests the following permissions:</div>
<div>
<ul>
{{range .WantsList}}
<li>{{.}}</li>
2023-09-06 22:20:09 +01:00
{{end}}
</ul>
</div>
{{if .HasOtp}}
<div>
<label for="field_code">OTP Code:</label>
<input type="text" name="code" id="field_code" required pattern="[0-9]{6,8}" title="6/7/8 digit one time passcode"/>
</div>
{{end}}
2023-09-06 22:20:09 +01:00
<div>
<input type="hidden" name="response_type" value="{{.ResponseType}}"/>
<input type="hidden" name="response_mode" value="{{.ResponseMode}}">
2023-09-06 22:20:09 +01:00
<input type="hidden" name="client_id" value="{{.ClientID}}"/>
<input type="hidden" name="redirect_uri" value="{{.RedirectUri}}"/>
2023-09-06 22:20:09 +01:00
<input type="hidden" name="state" value="{{.State}}"/>
<input type="hidden" name="scope" value="{{.Scope}}"/>
2023-09-06 22:20:09 +01:00
<input type="hidden" name="nonce" value="{{.Nonce}}"/>
<button class="oauth-action-authorize" name="oauth_action" value="authorize">Authorize</button>
<button class="oauth-action-cancel" name="oauth_action" value="cancel">Cancel</button>
</div>
<div>Authorizing this action will redirect you to {{.AppDomain}} with access to the permissions requested above.</div>
2023-09-06 22:20:09 +01:00
</form>
</main>
</body>
</html>