Browse Source

html/css work

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
sqlite
Stephan Richter 4 months ago
parent
commit
358fe1099b
  1. 5
      Readme.md
  2. 45
      de.srsoftware.oidc.web/src/main/resources/de/clients.html
  3. 43
      de.srsoftware.oidc.web/src/main/resources/de/edit_client.html
  4. 35
      de.srsoftware.oidc.web/src/main/resources/de/login.html
  5. 12
      de.srsoftware.oidc.web/src/main/resources/de/logout.html
  6. 3
      de.srsoftware.oidc.web/src/main/resources/de/navigation.html
  7. 42
      de.srsoftware.oidc.web/src/main/resources/de/new_client.html
  8. 76
      de.srsoftware.oidc.web/src/main/resources/de/settings.html
  9. 45
      de.srsoftware.oidc.web/src/main/resources/en/clients.html
  10. 60
      de.srsoftware.oidc.web/src/main/resources/en/edit_client.html
  11. 6
      de.srsoftware.oidc.web/src/main/resources/en/index.html
  12. 46
      de.srsoftware.oidc.web/src/main/resources/en/login.html
  13. 2
      de.srsoftware.oidc.web/src/main/resources/en/logout.html
  14. 1
      de.srsoftware.oidc.web/src/main/resources/en/navigation.html
  15. 61
      de.srsoftware.oidc.web/src/main/resources/en/new_client.html
  16. 2
      de.srsoftware.oidc.web/src/main/resources/en/scripts/clients.js
  17. 146
      de.srsoftware.oidc.web/src/main/resources/en/settings.html
  18. 48
      de.srsoftware.oidc.web/src/main/resources/en/style.css

5
Readme.md

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
# LightOIDC
This aims to be a [specification] compliant OpenID connect provider with minimal footprint.
[specification]: https://openid.net/specs/openid-connect-core-1_0.html

45
de.srsoftware.oidc.web/src/main/resources/de/clients.html

@ -9,27 +9,28 @@ @@ -9,27 +9,28 @@
</head>
<body>
<nav></nav>
<h1>Clients</h1>
<fieldset>
<legend>bei LightOIDC registrierte Clients:</legend>
<table>
<tr>
<th>Client</th>
<th>ID</th>
<th>Weiterleitungs-URLs</th>
<th>Aktionen</th>
</tr>
<tr id="bottom">
<td></td>
<td></td>
<td></td>
<td>
<button onclick="window.location.href='new_client.html';">Neuen Client hinzufügen…</button>
</td>
</tr>
</table>
<span class="hidden" id="message">Client "{}" wirklich löschen?</span>
</fieldset>
<div id="content">
<h1>Clients</h1>
<fieldset>
<legend>bei LightOIDC registrierte Clients:</legend>
<table>
<tr class="centered">
<th>Client</th>
<th>ID</th>
<th>Weiterleitungs-URLs</th>
<th>Aktionen</th>
</tr>
<tr id="bottom">
<td></td>
<td></td>
<td>
<button onclick="window.location.href='new_client.html';">Neuen Client hinzufügen…</button>
</td>
<td></td>
</tr>
</table>
<span class="hidden" id="message">Client "{}" wirklich löschen?</span>
</fieldset>
</div>
</body>
</html>

43
de.srsoftware.oidc.web/src/main/resources/de/edit_client.html

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
<html>
<head>
<meta charset="utf-8">
<title>Light OIDC</title>
<script src="scripts/common.js"></script>
<script src="scripts/user.js"></script>
<script src="scripts/edit_client.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav></nav>
<div id="content">
<h1>Client bearbeiten</h1>
<fieldset class="wide">
<legend>Daten</legend>
<table>
<tr>
<th>ID</th>
<td><input type="text" disabled="true" id="client-id" /></td>
</tr>
<tr>
<th>Name</th>
<td><input type="text" id="client-name" /></td>
</tr>
<tr>
<th>Geheimnis</th>
<td><input type="text" id="client-secret" /></td>
</tr>
<tr>
<th>Weiterleitungs-URIs</th>
<td>
<textarea id="redirect-urls"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><button type="button" id="button" onclick="updateClient();">Aktualisieren</button></td>
</tr>
</table>
</fieldset>
</div>
</body>
</html>

35
de.srsoftware.oidc.web/src/main/resources/de/login.html

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
<html>
<head>
<meta charset="utf-8">
<title>Light OIDC</title>
<script src="scripts/common.js"></script>
<script src="scripts/login.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="content">
<h1>Anmeldung</h1>
<fieldset id="login">
<legend>Zugangsdaten</legend>
<table>
<tr>
<th>Benutzername</th>
<td><input type="text" id="username" /></td>
</tr>
<tr>
<th>Passwort</th>
<td><input type="password" id="password" onkeydown="keyDown()"/></td>
</tr>
<tr id="error" style="display: none">
<th>Fehler</th>
<td class="warning">Anmeldung nicht erfolgreich!</td>
</tr>
<tr>
<td></td>
<td><button type="button" onClick="tryLogin()">Anmelden</button></td>
</tr>
</table>
</fieldset>
</div>
</body>
</html>

12
de.srsoftware.oidc.web/src/main/resources/de/logout.html

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
<html>
<head>
<meta charset="utf-8">
<title>Light OIDC</title>
<script src="scripts/common.js"></script>
<script src="scripts/logout.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="content">Sie werden abgemeldet…</div>
</body>
</html>

3
de.srsoftware.oidc.web/src/main/resources/de/navigation.html

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
<a href="index.html">Übersicht</a>
<a href="clients.html" class="MANAGE_CLIENTS">Clients</a>
<a href="users.html" class="MANAGE_USERS">Benutzer</a>
<a href="https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth" target="_blank">Spec</a>
<a href="settings.html">Einstellungen</a>
<a href="logout.html">Ausloggen</a>
<a href="logout.html">Abmelden</a>

42
de.srsoftware.oidc.web/src/main/resources/de/new_client.html

@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
<html>
<head>
<meta charset="utf-8">
<title>Light OIDC</title>
<script src="scripts/common.js"></script>
<script src="scripts/user.js"></script>
<script src="scripts/new_client.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav></nav>
<div id="content">
<h1>neuen Client hinzufügen</h1>
<fieldset>
<legend>Einstellungen</legend>
<table>
<tr>
<th>Client-Id</th>
<td><input type="text" size="50" id="client-id"></td>
</tr>
<tr>
<th>Client-Name</th>
<td><input type="text" size="50" id="client-name"></td>
</tr>
<tr>
<th>Client-Geheimnus</th>
<td><input type="text" size="50" id="client-secret"></td>
</tr>
<tr>
<th>Weiterleitungs-URLs</th>
<td><textarea cols="50" rows="5" id="redirect-urls"></textarea></td>
</tr>
<tr>
<td></td>
<td><button id="button" type="button" onclick="addClient()">Client speichern</button></td>
</tr>
</table>
</fieldset>
</div>
</body>
</html>

76
de.srsoftware.oidc.web/src/main/resources/de/settings.html

@ -0,0 +1,76 @@ @@ -0,0 +1,76 @@
<html>
<head>
<meta charset="utf-8">
<title>Light OIDC</title>
<script src="scripts/common.js"></script>
<script src="scripts/user.js"></script>
<script src="scripts/settings.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav></nav>
<div id="content">
<h1>Einstellungen</h1>
<form>
<fieldset>
<legend>
Benutzer
</legend>
<table>
<tr>
<th>Benutzername</th>
<td><input id="username" type="text"></td>
</tr>
<tr>
<th>E-Mail</th>
<td><input id="email" type="email"></td>
</tr>
<tr>
<th>ID</th>
<td><input id="uuid" type="text" disabled="true"></td>
</tr>
<tr id="update_error" style="display: none">
<th>Fehler</th>
<td class="warning">Aktualisieren der Einstellungen fehlgeschlagen!</td>
</tr>
<tr>
<td></td>
<td><button id="updateBtn" type="button" onClick="update()">Aktualisieren</button></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>
Passwort
</legend>
<table>
<tr>
<th>altes Passwort</th>
<td><input id="oldpass" type="password"></td>
</tr>
<tr>
<th>Neues Passwort</th>
<td><input id="newpass1" type="password"></td>
</tr>
<tr>
<th>Passwort wiederholen</th>
<td><input id="newpass2" type="password" onkeydown="passKeyDown()"></td>
</tr>
<tr id="wrong_password" style="display: none">
<th>Error</th>
<td class="warning">Wrong password!</td>
</tr>
<tr id="password_mismatch" style="display: none">
<th>Fehler</th>
<td class="warning">Passwort und Wiederholung stimmen nicht überein!</td>
</tr>
<tr>
<td></td>
<td><button id="passBtn" type="button" onClick="updatePass()">Aktualisieren</button></td>
</tr>
</table>
</fieldset>
</form>
</div>
</body>
</html>

45
de.srsoftware.oidc.web/src/main/resources/en/clients.html

@ -9,28 +9,29 @@ @@ -9,28 +9,29 @@
</head>
<body>
<nav></nav>
<h1>Clients</h1>
<div id="content">
<h1>Clients</h1>
<fieldset>
<legend>These are clients that are registered with LightOIDC:</legend>
<table>
<tr class="centered">
<th>Client</th>
<th>ID</th>
<th>Redirect URLs</th>
<th>Actions</th>
</tr>
<tr id="bottom">
<td></td>
<td></td>
<td>
<button onclick="window.location.href='new_client.html';">Add new client…</button>
</td>
<td></td>
<fieldset>
<legend>These are clients that are registered with LightOIDC:</legend>
<table>
<tr>
<th>Client</th>
<th>ID</th>
<th>Redirect URLs</th>
<th>Actions</th>
</tr>
<tr id="bottom">
<td></td>
<td></td>
<td></td>
<td>
<button onclick="window.location.href='new_client.html';">Add new client…</button>
</td>
</tr>
</table>
<span class="hidden" id="message">Really remove client "{}"?</span>
</fieldset>
<a href="https://umbrella.srsoftware.de/user/login">Umbrella</a>
</tr>
</table>
<span class="hidden" id="message">Really remove client "{}"?</span>
</fieldset>
</div>
</body>
</html>

60
de.srsoftware.oidc.web/src/main/resources/en/edit_client.html

@ -8,34 +8,36 @@ @@ -8,34 +8,36 @@
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav></nav>
<h1>Edit client</h1>
<fieldset>
<legend>Data</legend>
<table>
<tr>
<th>ID</th>
<td><input type="text" disabled="true" id="client-id" /></td>
</tr>
<tr>
<th>Name</th>
<td><input type="text" id="client-name" /></td>
</tr>
<tr>
<th>Secret</th>
<td><input type="text" id="client-secret" /></td>
</tr>
<tr>
<th>Redirect URIs</th>
<td>
<textarea id="redirect-urls"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><button type="button" id="button" onclick="updateClient();">Update</button></td>
</tr>
</table>
</fieldset>
<nav></nav>
<div id="content">
<h1>Edit client</h1>
<fieldset class="wide">
<legend>Data</legend>
<table>
<tr>
<th>ID</th>
<td><input type="text" disabled="true" id="client-id" /></td>
</tr>
<tr>
<th>Name</th>
<td><input type="text" id="client-name" /></td>
</tr>
<tr>
<th>Secret</th>
<td><input type="text" id="client-secret" /></td>
</tr>
<tr>
<th>Redirect URIs</th>
<td>
<textarea id="redirect-urls"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><button type="button" id="button" onclick="updateClient();">Update</button></td>
</tr>
</table>
</fieldset>
</div>
</body>
</html>

6
de.srsoftware.oidc.web/src/main/resources/en/index.html

@ -7,7 +7,9 @@ @@ -7,7 +7,9 @@
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav></nav>
<h1>Welcome!</h1>
<nav></nav>
<div id="content">
<h1>Welcome!</h1>
</div>
</body>
</html>

46
de.srsoftware.oidc.web/src/main/resources/en/login.html

@ -7,27 +7,29 @@ @@ -7,27 +7,29 @@
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>Login</h1>
<fieldset id="login">
<legend>User credentials</legend>
<table>
<tr>
<th>User name</th>
<td><input type="text" id="username" /></td>
</tr>
<tr>
<th>Password</th>
<td><input type="password" id="password" onkeydown="keyDown()"/></td>
</tr>
<tr id="error" style="display: none">
<th>Error</th>
<td class="warning">Failed to log in!</td>
</tr>
<tr>
<td></td>
<td><button type="button" onClick="tryLogin()">Login</button></td>
</tr>
</table>
</fieldset>
<div id="content">
<h1>Login</h1>
<fieldset id="login">
<legend>User credentials</legend>
<table>
<tr>
<th>User name</th>
<td><input type="text" id="username" /></td>
</tr>
<tr>
<th>Password</th>
<td><input type="password" id="password" onkeydown="keyDown()"/></td>
</tr>
<tr id="error" style="display: none">
<th>Error</th>
<td class="warning">Failed to log in!</td>
</tr>
<tr>
<td></td>
<td><button type="button" onClick="tryLogin()">Login</button></td>
</tr>
</table>
</fieldset>
</div>
</body>
</html>

2
de.srsoftware.oidc.web/src/main/resources/en/logout.html

@ -7,6 +7,6 @@ @@ -7,6 +7,6 @@
<link rel="stylesheet" href="style.css" />
</head>
<body>
You are being logged out…
<div id="content">You are being logged out…</div>
</body>
</html>

1
de.srsoftware.oidc.web/src/main/resources/en/navigation.html

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
<a href="index.html">Dashboard</a>
<a href="clients.html" class="MANAGE_CLIENTS">Clients</a>
<a href="users.html" class="MANAGE_USERS">Users</a>
<a href="https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth" target="_blank">Spec</a>
<a href="settings.html">Settings</a>
<a href="logout.html">Logout</a>

61
de.srsoftware.oidc.web/src/main/resources/en/new_client.html

@ -7,33 +7,36 @@ @@ -7,33 +7,36 @@
<script src="scripts/new_client.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav></nav>
<h1>Add new client</h1>
<fieldset>
<legend>Settings</legend>
<table>
<tr>
<th>client id</th>
<td><input type="text" size="50" id="client-id"></td>
</tr>
<tr>
<th>client name</th>
<td><input type="text" size="50" id="client-name"></td>
</tr>
<tr>
<th>client secret</th>
<td><input type="text" size="50" id="client-secret"></td>
</tr>
<tr>
<th>redirect urls</th>
<td><textarea cols="50" rows="5" id="redirect-urls"></textarea></td>
</tr>
<tr>
<td></td>
<td><button id="button" type="button" onclick="addClient()">Add client</button></td>
</tr>
</table>
</fieldset>
</body>
<body>
<nav></nav>
<div id="content">
<h1>Add new client</h1>
<fieldset>
<legend>Settings</legend>
<table>
<tr>
<th>client id</th>
<td><input type="text" size="50" id="client-id"></td>
</tr>
<tr>
<th>client name</th>
<td><input type="text" size="50" id="client-name"></td>
</tr>
<tr>
<th>client secret</th>
<td><input type="text" size="50" id="client-secret"></td>
</tr>
<tr>
<th>redirect urls</th>
<td><textarea cols="50" rows="5" id="redirect-urls"></textarea></td>
</tr>
<tr>
<td></td>
<td><button id="button" type="button" onclick="addClient()">Add client</button></td>
</tr>
</table>
</fieldset>
</div>
</body>
</html>

2
de.srsoftware.oidc.web/src/main/resources/en/scripts/clients.js

@ -8,7 +8,7 @@ async function handleClients(response){ @@ -8,7 +8,7 @@ async function handleClients(response){
for (let id in clients){
var row = document.createElement("tr");
var client = clients[id];
row.innerHTML = "<td>"+client.name+"</td>\n<td>"+id+"</td>\n<td>"+client.redirect_uris.join("<br/>")+'</td>\n<td><button onclick="remove(\''+id+'\')" type="button">remove '+client.name+'</button><button type="button" onclick="edit(\''+id+'\')">Edit</button></td>';
row.innerHTML = "<td>"+client.name+"</td>\n<td>"+id+"</td>\n<td>"+client.redirect_uris.join("<br/>")+'</td>\n<td><button class="danger" onclick="remove(\''+id+'\')" type="button">remove&nbsp;'+client.name+'</button><button type="button" onclick="edit(\''+id+'\')">Edit</button></td>';
bottom.parentNode.insertBefore(row,bottom);
}
}

146
de.srsoftware.oidc.web/src/main/resources/en/settings.html

@ -1,74 +1,76 @@ @@ -1,74 +1,76 @@
<html>
<head>
<meta charset="utf-8">
<title>Light OIDC</title>
<script src="scripts/common.js"></script>
<script src="scripts/user.js"></script>
<script src="scripts/settings.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav></nav>
<h1>Settings</h1>
<form>
<fieldset>
<legend>
Basic settings
</legend>
<table>
<tr>
<th>User name</th>
<td><input id="username" type="text"></td>
</tr>
<tr>
<th>Email</th>
<td><input id="email" type="email"></td>
</tr>
<tr>
<th>ID</th>
<td><input id="uuid" type="text" disabled="true"></td>
</tr>
<tr id="update_error" style="display: none">
<th>Error</th>
<td class="warning">Failed to update settings!</td>
</tr>
<tr>
<td></td>
<td><button id="updateBtn" type="button" onClick="update()">Update</button></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>
Password
</legend>
<table>
<tr>
<th>Old password</th>
<td><input id="oldpass" type="password"></td>
</tr>
<tr>
<th>New Password</th>
<td><input id="newpass1" type="password"></td>
</tr>
<tr>
<th>Repeat Password</th>
<td><input id="newpass2" type="password" onkeydown="passKeyDown()"></td>
</tr>
<tr id="wrong_password" style="display: none">
<th>Error</th>
<td class="warning">Wrong password!</td>
</tr>
<tr id="password_mismatch" style="display: none">
<th>Error</th>
<td class="warning">Mismatch between new password and repetition!</td>
</tr>
<tr>
<td></td>
<td><button id="passBtn" type="button" onClick="updatePass()">Update</button></td>
</tr>
</table>
</fieldset>
</form>
</body>
<head>
<meta charset="utf-8">
<title>Light OIDC</title>
<script src="scripts/common.js"></script>
<script src="scripts/user.js"></script>
<script src="scripts/settings.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<nav></nav>
<div id="content">
<h1>Settings</h1>
<form>
<fieldset>
<legend>
User settings
</legend>
<table>
<tr>
<th>User name</th>
<td><input id="username" type="text"></td>
</tr>
<tr>
<th>Email</th>
<td><input id="email" type="email"></td>
</tr>
<tr>
<th>ID</th>
<td><input id="uuid" type="text" disabled="true"></td>
</tr>
<tr id="update_error" style="display: none">
<th>Error</th>
<td class="warning">Failed to update settings!</td>
</tr>
<tr>
<td></td>
<td><button id="updateBtn" type="button" onClick="update()">Update</button></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>
Password
</legend>
<table>
<tr>
<th>Old password</th>
<td><input id="oldpass" type="password"></td>
</tr>
<tr>
<th>New Password</th>
<td><input id="newpass1" type="password"></td>
</tr>
<tr>
<th>Repeat Password</th>
<td><input id="newpass2" type="password" onkeydown="passKeyDown()"></td>
</tr>
<tr id="wrong_password" style="display: none">
<th>Error</th>
<td class="warning">Wrong password!</td>
</tr>
<tr id="password_mismatch" style="display: none">
<th>Error</th>
<td class="warning">Mismatch between new password and repetition!</td>
</tr>
<tr>
<td></td>
<td><button id="passBtn" type="button" onClick="updatePass()">Update</button></td>
</tr>
</table>
</fieldset>
</form>
</div>
</body>
</html>

48
de.srsoftware.oidc.web/src/main/resources/en/style.css

@ -1,24 +1,55 @@ @@ -1,24 +1,55 @@
body {
background: black;
background: rgb(48,48,48);
color: white;
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
text-align: center;
}
a{
color: rgb(108, 182, 255);
text-decoration: none;
font-weight: bold;
}
#content {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
width: 100%;
}
button {
background: royalblue;
border: none;
border-radius: 7px;
padding: 10px;
color: white;
margin: 2px;
}
.danger{
background: crimson;
}
body fieldset {
border-radius: 10px;
display: inline-block;
}
a {
color: yellow;
.wide input, textarea{
width: 600px;
}
input, textarea{
width: 600px;
border: none;
border-radius: 3px;
background-color: rgb(38, 103, 152);
padding: 7px;
color: white;
margin: 2px;
}
input:disabled{
color: white;
background-color: gray;
color: indigo;
}
fieldset th,
@ -26,6 +57,11 @@ form th{ @@ -26,6 +57,11 @@ form th{
text-align: right;
}
fieldset .centered th,
form .centered th{
text-align: center;
}
.hidden{
display: none;
}

Loading…
Cancel
Save