working on user login

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-07-17 00:18:14 +02:00
parent 5627db16b5
commit add4209a1f
22 changed files with 173 additions and 401 deletions

View File

@@ -0,0 +1,32 @@
plugins {
id 'java'
}
group = 'de.srsoftware'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
implementation project(':de.srsoftware.oidc.api')
implementation project(':de.srsoftware.oidc.backend')
implementation project(':de.srsoftware.oidc.web')
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes "Main-Class": "de.srsoftware.oidc.app.Application"
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}

View File

@@ -0,0 +1,24 @@
/* © SRSoftware 2024 */
package de.srsoftware.oidc.app;
import com.sun.net.httpserver.HttpServer;
import de.srsoftware.oidc.backend.Backend;
import de.srsoftware.oidc.web.Forward;
import de.srsoftware.oidc.web.StaticPages;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
public class Application {
public static final String STATIC_PATH = "/web";
public static final String INDEX = STATIC_PATH + "/index.html";
public static void main(String[] args) throws Exception {
HttpServer server = HttpServer.create(new InetSocketAddress(8080), 0);
new StaticPages().bindPath(STATIC_PATH).on(server);
new Forward(INDEX).bindPath("/").on(server);
new Backend().bindPath("/api").on(server);
server.setExecutor(Executors.newCachedThreadPool());
server.start();
}
}