Refactor; add services in settings
This commit is contained in:
parent
17fabd21c9
commit
f14d8d3114
7 changed files with 272 additions and 224 deletions
|
@ -1,136 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>FastAPI OIDC test</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background-color: floralwhite;
|
||||
margin: 0;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
background-color: #f7c7867d;
|
||||
margin: 0 0 0.2em 0;
|
||||
}
|
||||
p {
|
||||
margin: 0.2em;
|
||||
}
|
||||
hr {
|
||||
margin: 0.2em;
|
||||
}
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.user-info {
|
||||
padding: 0.5em;
|
||||
display: flex;
|
||||
gap: 0.5em;
|
||||
flex-direction: column;
|
||||
width: fit-content;
|
||||
align-items: center;
|
||||
margin: 5px auto;
|
||||
box-shadow: 0px 0px 10px lightgreen;
|
||||
background-color: lightgreen;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.user-info * {
|
||||
flex: 2 1 auto;
|
||||
margin: 0;
|
||||
}
|
||||
.user-info .picture {
|
||||
max-width: 3em;
|
||||
max-height: 3em
|
||||
}
|
||||
.user-info a.logout {
|
||||
border: 2px solid darkkhaki;
|
||||
padding: 3px 6px;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
color: black;
|
||||
}
|
||||
.user-info a.logout:hover {
|
||||
background-color: orange;
|
||||
}
|
||||
.debug-auth {
|
||||
font-size: 90%;
|
||||
background-color: #d8bebc75;
|
||||
padding: 6px;
|
||||
}
|
||||
.debug-auth * {
|
||||
margin: 0;
|
||||
}
|
||||
.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 {
|
||||
font-weight: bold;
|
||||
}
|
||||
.content {
|
||||
text-align: left;
|
||||
}
|
||||
.content #links-to-check {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
gap: 0.5em;
|
||||
flex-flow: wrap;
|
||||
}
|
||||
.content #links-to-check a {
|
||||
color: black;
|
||||
padding: 5px 10px;
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.hasResponseStatus {
|
||||
background-color: #88888840;
|
||||
}
|
||||
.hasResponseStatus.status-200 {
|
||||
background-color: #00ff0040;
|
||||
}
|
||||
.hasResponseStatus.status-401 {
|
||||
background-color: #ff000040;
|
||||
}
|
||||
.hasResponseStatus.status-403 {
|
||||
background-color: #ff990040;
|
||||
}
|
||||
.role {
|
||||
padding: 3px 6px;
|
||||
background-color: #44228840;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function checkHref(elem) {
|
||||
var xmlHttp = new XMLHttpRequest()
|
||||
xmlHttp.onreadystatechange = function() {
|
||||
if (xmlHttp.readyState == 4) {
|
||||
elem.classList.add("hasResponseStatus")
|
||||
elem.classList.add("status-" + xmlHttp.status)
|
||||
elem.title = "Response code: " + xmlHttp.status + " - " + xmlHttp.statusText
|
||||
}
|
||||
}
|
||||
xmlHttp.open("GET", elem.href, true) // true for asynchronous
|
||||
xmlHttp.send(null)
|
||||
}
|
||||
function checkPerms(rootId) {
|
||||
var rootElem = document.getElementById(rootId)
|
||||
Array.from(rootElem.children).forEach(elem => checkHref(elem))
|
||||
}
|
||||
</script>
|
||||
<link href="{{ url_for('static', path='/styles.css') }}" rel="stylesheet">
|
||||
<script src="{{ url_for('static', path='/utils.js') }}"></script>
|
||||
</head>
|
||||
<body onload="checkPerms('links-to-check')">
|
||||
<h1>OIDC-test</h1>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue