This commit is contained in:
nora 2025-07-12 21:38:06 +02:00
commit 1772e21364
13 changed files with 2961 additions and 0 deletions

24
idp/templates/index.html Normal file
View file

@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>IDP</title>
</head>
<body>
<h1>Your favorite identity provider</h1>
<a href="/">home</a>
{% if let Some(username) = username %}
<p>Hello, {{username}}!</p>
{% endif %}
<div>
<a href="/signup">Create an account</a>
</div>
<div>
<a href="/login">Login</a>
</div>
<div>
<a href="/users">List all users</a>
</div>
</body>
</html>

29
idp/templates/login.html Normal file
View file

@ -0,0 +1,29 @@
<!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>
</head>
<body>
<h1>Log into your beautiful account</h1>
<a href="/">home</a>
<form method="post" action="/login">
<div>
<label for="username">Username</label>
<input id="username" name="username" />
</div>
<div>
<label for="password">Password</label>
<input id="password" name="password" />
</div>
<button type="submit">Login</button>
{% if error %}
<p>Invalid username or password.</p>
{% endif %}
</form>
</body>
</html>

29
idp/templates/signup.html Normal file
View file

@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Signup - IDP</title>
</head>
<body>
<h1>Create a new account</h1>
<a href="/">home</a>
<form method="post" action="/signup">
<div>
<label for="username">Username</label>
<input id="username" name="username" />
</div>
<div>
<label for="password">Password</label>
<input id="password" name="password" />
</div>
<button type="submit">Create Account</button>
{% if already_exists %}
<p>Username is already taken</p>
{% endif %}
</form>
</body>
</html>

17
idp/templates/users.html Normal file
View file

@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Users - IDP</title>
</head>
<body>
<h1>Your favorite identity provider</h1>
<a href="/">home</a>
<ul>
{% for user in users %}
<li>{{user}}</li>
{% endfor %}
</ul>
</body>
</html>