mirror of
https://github.com/Noratrieb/oh-oh.git
synced 2026-01-16 18:05:07 +01:00
oidc stuff
This commit is contained in:
parent
4d7a2be572
commit
30c49c3795
12 changed files with 538 additions and 6 deletions
38
idp/templates/add-oauth-client.html
Normal file
38
idp/templates/add-oauth-client.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Login - IDP</title>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Register a new OAuth client</h1>
|
||||
<a href="/">home</a>
|
||||
<form method="post">
|
||||
<div>
|
||||
<label for="app_name">App Name</label>
|
||||
<input id="app_name" name="app_name" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="redirect_uri">Redirect URI</label>
|
||||
<input id="redirect_uri" name="redirect_uri" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="client_type">Client Type</label>
|
||||
<select id="client_type" name="client_type">
|
||||
<option value="confidential">confidential</option>
|
||||
<option value="private">private</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit">Create</button>
|
||||
|
||||
{% if let Some(error) = error %}
|
||||
<p>error: {{error}}</p>
|
||||
{% endif %}
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -9,9 +9,17 @@
|
|||
<body>
|
||||
<h1>Your favorite identity provider</h1>
|
||||
<a href="/">home</a>
|
||||
<p>OAuth Config</p>
|
||||
<div>
|
||||
<a href="/oauth-clients">List all OAuth clients</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/add-oauth-client">Register a new OAuth client</a>
|
||||
</div>
|
||||
{% if let Some(username) = username %}
|
||||
<p>Hello, {{username}}!</p>
|
||||
{% endif %}
|
||||
<p>Login</p>
|
||||
<div>
|
||||
<a href="/signup">Create an account</a>
|
||||
</div>
|
||||
|
|
@ -22,6 +30,7 @@
|
|||
<a href="/users">List all users</a>
|
||||
</div>
|
||||
{% if let Some(username) = username %}
|
||||
<p>Account</p>
|
||||
<div>
|
||||
<a href="/sessions">List all active sessions your account</a>
|
||||
</div>
|
||||
|
|
|
|||
36
idp/templates/oauth-clients.html
Normal file
36
idp/templates/oauth-clients.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>OAuth Clients - IDP</title>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>See OAuth clients registered</h1>
|
||||
<a href="/">home</a>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>App Name</th>
|
||||
<th>Client ID</th>
|
||||
<th>Redirect URI</th>
|
||||
<th>Client Type</th>
|
||||
<th>Client Secret</th>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for client in clients %}
|
||||
<tr>
|
||||
<td>{{ client.app_name }}</td>
|
||||
<td>{{ client.client_id }}</td>
|
||||
<td>{{ client.redirect_uri }}</td>
|
||||
<td>{{ client.client_type }}</td>
|
||||
<td>{{ client.client_secret }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -3,6 +3,10 @@ body {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: rgb(41, 41, 41);
|
||||
|
|
@ -53,3 +57,17 @@ form:not(.fake-form) {
|
|||
.fake-form {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
table {
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
:is(td, th):not(:last-child) {
|
||||
padding-right: 10px;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue