WIP scopes screen and session management

This commit is contained in:
Dusan Jakub
2023-09-13 15:37:08 +02:00
parent 451eccfe00
commit e703ca25a1
12 changed files with 226 additions and 97 deletions

View File

@@ -20,7 +20,7 @@
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.login-container h2 {
@@ -70,11 +70,21 @@
<body>
<div class="login-container">
<h2>Consents</h2>
{#if error == "invalid_credentials"}
<div class="error-popup" id="error-popup">Invalid credentials</div>
{/if}
<p>Hello <strong>{user.login}</strong></p>
<p>You are authorizing to <strong>{client.description}</strong>, which requests the following permissions from you:</p>
<form action="" method="post">
<button type="submit" class="login-button">Login</button>
<input type="hidden" name="sessionId" value="{sessionId}">
<ul>
{#each scopes}
<li>
<label><input type="checkbox" name="scope" value="{it}" checked>{it}</label>
</li>
{/each}
</ul>
<button type="submit" class="login-button">Confirm</button>
</form>
</div>
</body>

View File

@@ -20,7 +20,7 @@
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.login-container h2 {
@@ -74,6 +74,7 @@
<div class="error-popup" id="error-popup">Invalid credentials</div>
{/if}
<form action="" method="post">
<input type="hidden" name="sessionId" value="{sessionId}">
<div class="form-group">
<label for="username">Username:</label>
<input type="text" id="username" name="username" value="{loginHint}" required>