The login page now shows the service name and a "Sign in with MCIAS" button instead of immediately redirecting to MCIAS. This lets the user know what service they are logging into before the redirect. - GET /login renders the landing page with SSO button - GET /sso/redirect initiates the actual SSO redirect - Non-SSO login form still works when SSO is not configured Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
910 B
HTML
28 lines
910 B
HTML
{{define "title"}}Login{{end}}
|
|
|
|
{{define "content"}}
|
|
<div class="login-container">
|
|
<h1>Metacircular Container Registry</h1>
|
|
{{if .Error}}
|
|
<div class="error">{{.Error}}</div>
|
|
{{end}}
|
|
{{if .SSO}}
|
|
<p>Sign in to manage container images, policies, and audit logs.</p>
|
|
<a href="/sso/redirect" class="btn">Sign in with MCIAS</a>
|
|
{{else}}
|
|
<form method="POST" action="/login">
|
|
<input type="hidden" name="_csrf" value="{{.CSRFToken}}">
|
|
<div class="form-group">
|
|
<label for="username">Username</label>
|
|
<input type="text" id="username" name="username" required autofocus>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="password">Password</label>
|
|
<input type="password" id="password" name="password" required>
|
|
</div>
|
|
<button type="submit">Sign In</button>
|
|
</form>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|