2025-01-02 02:14:30 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>FastAPI OIDC test</title>
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
font-family: Arial, Helvetica, sans-serif;
|
2025-01-13 17:01:11 +01:00
|
|
|
background-color: floralwhite;
|
2025-01-13 17:06:45 +01:00
|
|
|
margin: 0;
|
2025-01-02 02:14:30 +01:00
|
|
|
}
|
|
|
|
h1 {
|
|
|
|
text-align: center;
|
2025-01-13 17:06:45 +01:00
|
|
|
background-color: #f7c7867d;
|
|
|
|
margin: 0 0 0.2em 0;
|
2025-01-02 02:14:30 +01:00
|
|
|
}
|
2025-01-11 03:54:53 +01:00
|
|
|
p {
|
|
|
|
margin: 0.2em;
|
|
|
|
}
|
|
|
|
hr {
|
|
|
|
margin: 0.2em;
|
|
|
|
}
|
2025-01-10 17:33:10 +01:00
|
|
|
.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
2025-01-10 19:03:09 +01:00
|
|
|
.center {
|
|
|
|
text-align: center;
|
|
|
|
}
|
2025-01-02 02:14:30 +01:00
|
|
|
.content {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
.user-info {
|
2025-01-13 17:01:11 +01:00
|
|
|
padding: 0.5em;
|
2025-01-02 02:14:30 +01:00
|
|
|
display: flex;
|
|
|
|
gap: 0.5em;
|
|
|
|
flex-direction: column;
|
|
|
|
width: fit-content;
|
|
|
|
align-items: center;
|
2025-01-03 12:39:41 +01:00
|
|
|
margin: 5px auto;
|
2025-01-02 02:14:30 +01:00
|
|
|
box-shadow: 0px 0px 10px lightgreen;
|
|
|
|
background-color: lightgreen;
|
2025-01-13 17:01:11 +01:00
|
|
|
border-radius: 8px;
|
2025-01-02 02:14:30 +01:00
|
|
|
}
|
|
|
|
.user-info * {
|
|
|
|
flex: 2 1 auto;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
.user-info .picture {
|
|
|
|
max-width: 3em;
|
|
|
|
max-height: 3em
|
|
|
|
}
|
2025-01-03 12:39:41 +01:00
|
|
|
.user-info a.logout {
|
2025-01-03 13:36:22 +01:00
|
|
|
border: 2px solid darkkhaki;
|
2025-01-03 12:39:41 +01:00
|
|
|
padding: 3px 6px;
|
|
|
|
text-decoration: none;
|
|
|
|
text-align: center;
|
|
|
|
color: black;
|
|
|
|
}
|
|
|
|
.user-info a.logout:hover {
|
|
|
|
background-color: orange;
|
|
|
|
}
|
2025-01-10 23:40:24 +01:00
|
|
|
.debug-auth {
|
2025-01-02 02:14:30 +01:00
|
|
|
font-size: 90%;
|
2025-01-03 13:36:22 +01:00
|
|
|
background-color: #d8bebc75;
|
|
|
|
padding: 6px;
|
|
|
|
}
|
|
|
|
.debug-auth * {
|
|
|
|
margin: 0;
|
2025-01-02 02:14:30 +01:00
|
|
|
}
|
2025-01-03 13:36:22 +01:00
|
|
|
.debug-auth p {
|
|
|
|
text-align: center;
|
|
|
|
border-bottom: 1px solid black;
|
|
|
|
}
|
|
|
|
.debug-auth ul {
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
.debug-auth p, .debug-auth .key {
|
2025-01-02 02:14:30 +01:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
2025-01-02 03:09:16 +01:00
|
|
|
.content {
|
|
|
|
text-align: left;
|
|
|
|
}
|
2025-01-03 13:36:22 +01:00
|
|
|
.content #links-to-check {
|
2025-01-03 12:39:41 +01:00
|
|
|
display: flex;
|
|
|
|
text-align: center;
|
2025-01-10 19:03:09 +01:00
|
|
|
justify-content: center;
|
|
|
|
gap: 0.5em;
|
|
|
|
flex-flow: wrap;
|
2025-01-03 12:39:41 +01:00
|
|
|
}
|
2025-01-03 13:36:22 +01:00
|
|
|
.content #links-to-check a {
|
2025-01-03 12:39:41 +01:00
|
|
|
color: black;
|
2025-01-10 19:03:09 +01:00
|
|
|
padding: 5px 10px;
|
2025-01-03 12:39:41 +01:00
|
|
|
text-decoration: none;
|
2025-01-10 19:03:09 +01:00
|
|
|
border-radius: 8px;
|
2025-01-03 12:39:41 +01:00
|
|
|
}
|
|
|
|
.hasResponseStatus {
|
|
|
|
background-color: #88888840;
|
|
|
|
}
|
|
|
|
.hasResponseStatus.status-200 {
|
|
|
|
background-color: #00ff0040;
|
|
|
|
}
|
|
|
|
.hasResponseStatus.status-401 {
|
|
|
|
background-color: #ff000040;
|
|
|
|
}
|
2025-01-09 23:41:32 +01:00
|
|
|
.hasResponseStatus.status-403 {
|
|
|
|
background-color: #ff990040;
|
|
|
|
}
|
2025-01-05 05:06:58 +01:00
|
|
|
.role {
|
|
|
|
padding: 3px 6px;
|
|
|
|
background-color: #44228840;
|
|
|
|
}
|
2025-01-02 02:14:30 +01:00
|
|
|
</style>
|
2025-01-03 12:39:41 +01:00
|
|
|
<script>
|
2025-01-03 13:36:22 +01:00
|
|
|
function checkHref(elem) {
|
|
|
|
var xmlHttp = new XMLHttpRequest()
|
2025-01-03 12:39:41 +01:00
|
|
|
xmlHttp.onreadystatechange = function() {
|
|
|
|
if (xmlHttp.readyState == 4) {
|
|
|
|
elem.classList.add("hasResponseStatus")
|
|
|
|
elem.classList.add("status-" + xmlHttp.status)
|
2025-01-03 13:36:22 +01:00
|
|
|
elem.title = "Response code: " + xmlHttp.status
|
2025-01-03 12:39:41 +01:00
|
|
|
}
|
|
|
|
}
|
2025-01-03 13:36:22 +01:00
|
|
|
xmlHttp.open("GET", elem.href, true) // true for asynchronous
|
|
|
|
xmlHttp.send(null)
|
2025-01-03 12:39:41 +01:00
|
|
|
}
|
2025-01-03 13:36:22 +01:00
|
|
|
function checkPerms(rootId) {
|
|
|
|
var rootElem = document.getElementById(rootId)
|
|
|
|
Array.from(rootElem.children).forEach(elem => checkHref(elem))
|
2025-01-03 12:39:41 +01:00
|
|
|
}
|
|
|
|
</script>
|
2025-01-02 02:14:30 +01:00
|
|
|
</head>
|
2025-01-03 13:36:22 +01:00
|
|
|
<body onload="checkPerms('links-to-check')">
|
2025-01-11 03:54:53 +01:00
|
|
|
<h1>OIDC-test</h1>
|
2025-01-09 23:41:32 +01:00
|
|
|
{% block content %}
|
|
|
|
{% endblock %}
|
2025-01-02 02:14:30 +01:00
|
|
|
</body>
|
|
|
|
</html>
|