working on token endpoint
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/* © SRSoftware 2024 */
|
||||
package de.srsoftware.oidc.web;
|
||||
|
||||
import static java.lang.System.Logger.Level.INFO;
|
||||
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import de.srsoftware.oidc.api.PathHandler;
|
||||
import java.io.IOException;
|
||||
|
||||
import static java.lang.System.Logger.Level.INFO;
|
||||
|
||||
public class Forward extends PathHandler {
|
||||
private final int CODE = 302;
|
||||
private final String toPath;
|
||||
@@ -17,7 +17,7 @@ public class Forward extends PathHandler {
|
||||
|
||||
@Override
|
||||
public boolean doGet(String path, HttpExchange ex) throws IOException {
|
||||
LOG.log(INFO,"Forwarding ({0}}) {1} to {2}…", CODE, path, toPath);
|
||||
LOG.log(INFO, "Forwarding ({0}}) {1} to {2}…", CODE, path, toPath);
|
||||
return sendRedirect(ex, toPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ public class StaticPages extends PathHandler {
|
||||
try {
|
||||
Response response = loadFile(lang, relativePath).orElseThrow(() -> new FileNotFoundException());
|
||||
ex.getResponseHeaders().add(CONTENT_TYPE, response.contentType);
|
||||
LOG.log(DEBUG,"Loaded {0} for language {1}…success.", relativePath, lang);
|
||||
LOG.log(DEBUG, "Loaded {0} for language {1}…success.", relativePath, lang);
|
||||
return sendContent(ex, response.content);
|
||||
} catch (FileNotFoundException fnf) {
|
||||
LOG.log(WARNING,"Loaded {0} for language {1}…failed.", relativePath, lang);
|
||||
LOG.log(WARNING, "Loaded {0} for language {1}…failed.", relativePath, lang);
|
||||
return sendEmptyResponse(HTTP_NOT_FOUND, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,29 +8,31 @@
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<a id="clients" href="clients.html">Clients</a>
|
||||
</nav>
|
||||
<h1>Clients</h1>
|
||||
<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='newclient.html';">Add new client…</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<span class="hidden" id="message">Really remove client "{}"?</span>
|
||||
</fieldset>
|
||||
<nav>
|
||||
<a id="clients" href="clients.html">Clients</a>
|
||||
</nav>
|
||||
<h1>Clients</h1>
|
||||
<a href="https://umbrella.srsoftware.de/user/login">Umbrella</a>
|
||||
|
||||
<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='newclient.html';">Add new client…</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<span class="hidden" id="message">Really remove client "{}"?</span>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
||||
@@ -29,6 +29,5 @@
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<a href="https://umbrella.srsoftware.de/user/login">Umbrella</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user