diff options
| author | Paul-Christian Volkmer | 2024-01-31 15:43:10 +0100 |
|---|---|---|
| committer | Paul-Christian Volkmer | 2024-01-31 15:57:16 +0100 |
| commit | 17e04a3f8972fe5eca0bf3b236293e4a6998e56f (patch) | |
| tree | 5fc1a30c2991827cc610e0d2a83bfb4f32109d12 /src/main/resources | |
| parent | f71a775e12bfc6fe50e0b443863ac8fec6f4a4f2 (diff) | |
feat: add basic support for OIDC login
Diffstat (limited to 'src/main/resources')
| -rw-r--r-- | src/main/resources/static/style.css | 7 | ||||
| -rw-r--r-- | src/main/resources/templates/fragments.html | 5 | ||||
| -rw-r--r-- | src/main/resources/templates/login.html | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index 3249aad..c7a0b38 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -209,7 +209,14 @@ form.samplecode-input input:focus-visible { border-radius: 3px; } +.login-form form hr, +.token-form form hr { + padding: 0; + width: 100%; +} + .login-form button, +.login-form a.btn, .token-form button { margin: 1em 0; background: var(--bg-blue); diff --git a/src/main/resources/templates/fragments.html b/src/main/resources/templates/fragments.html index 7a9af2f..bfa36a2 100644 --- a/src/main/resources/templates/fragments.html +++ b/src/main/resources/templates/fragments.html @@ -21,6 +21,11 @@ <a th:href="@{/login}">Login</a> </li> <li class="login" sec:authorize="isAuthenticated()"> + <span> + <span>👤</span> + <span sec:authentication="name">?</span> + </span> + <a th:href="@{/logout}">Abmelden</a> </li> </ul> diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index 9a63b46..4ef8ec9 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -13,9 +13,11 @@ <div class="centered notification error" th:if="${param.error}">Anmeldung nicht erfolgreich</div> <div class="centered notification success" th:if="${param.logout}">Sie haben sich abgemeldet</div> <form method="post" th:action="@{/login}"> - <input type="text" id="username" name="username" class="form-control" placeholder="Username" required="" autofocus=""> - <input type="password" id="password" name="password" class="form-control" placeholder="Password" required=""> + <input type="text" id="username" name="username" class="form-control" placeholder="Username" required="" autofocus="" /> + <input type="password" id="password" name="password" class="form-control" placeholder="Password" required="" /> <button type="submit">Anmelden</button> + <hr th:if="${not oidcLogins.isEmpty()}" /> + <a th:each="oidcLogin : ${oidcLogins}" class="btn" th:href="@{/oauth2/authorization/{provider}(provider=${oidcLogin.component1()})}">OIDC Login - [[ ${oidcLogin.component2()} ]]</a> </form> </div> </main> |
