upgrade to Spring Boot 4, add webauthn support, some cleanup

This commit is contained in:
2025-12-18 20:55:43 +01:00
parent c27e68caf0
commit b4b2552e7e
326 changed files with 2768 additions and 1075 deletions
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic;
import java.net.URI;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic;
import java.net.URI;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic;
import java.util.Set;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic;
import java.util.Date;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic;
import java.time.Instant;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.exception;
import java.net.URI;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.exception;
import de.bstly.we.oidc.businesslogic.model.OidcTokenErrorCode;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
import java.net.URI;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
/**
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
/**
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
import java.net.URI;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
/**
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
/**
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
/**
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
import java.net.URI;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.businesslogic.model;
import lombok.Getter;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller;
import java.io.IOException;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller;
import java.util.Optional;
@@ -64,7 +61,7 @@ public class OidcClientController extends BaseController {
*/
@PreAuthorize("hasRole('ROLE_ADMIN')")
@GetMapping("/{name}")
public OidcClient get(@PathVariable("name") String name) {
public OidcClient get(@PathVariable String name) {
OidcClient client = registeredClientService.getByClientName(name);
if (client == null) {
throw new EntityResponseStatusException(HttpStatus.NO_CONTENT);
@@ -81,7 +78,7 @@ public class OidcClientController extends BaseController {
*/
@PreAuthorize("hasRole('ROLE_ADMIN')")
@GetMapping("/id/{clientId}")
public OidcClient getByClientId(@PathVariable("clientId") String clientId) {
public OidcClient getByClientId(@PathVariable String clientId) {
OidcClient client = registeredClientService.getByClientId(clientId);
if (client == null) {
throw new EntityResponseStatusException(HttpStatus.NO_CONTENT);
@@ -152,7 +149,7 @@ public class OidcClientController extends BaseController {
*/
@PreAuthorize("hasRole('ROLE_ADMIN')")
@DeleteMapping("/{name}")
public void deleteClient(@PathVariable("name") String name) {
public void deleteClient(@PathVariable String name) {
if (registeredClientService.getByClientName(name) == null) {
throw new EntityResponseStatusException(HttpStatus.NOT_MODIFIED);
}
@@ -167,7 +164,7 @@ public class OidcClientController extends BaseController {
*/
@PreAuthorize("hasRole('ROLE_ADMIN')")
@PostMapping("/{name}/secret")
public OidcClient createNewSecret(@PathVariable("name") String name) {
public OidcClient createNewSecret(@PathVariable String name) {
if (registeredClientService.getByClientName(name) == null) {
throw new EntityResponseStatusException(HttpStatus.NOT_MODIFIED);
}
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller;
import java.net.URI;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller;
import java.util.Map;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller;
import java.io.IOException;
@@ -101,7 +98,7 @@ public class OidcSessionController extends BaseController {
*/
@PreAuthorize("authentication.authenticated")
@GetMapping("/{target}")
public OidcClientInfo getSessionsForTarget(@PathVariable("target") Long target) {
public OidcClientInfo getSessionsForTarget(@PathVariable Long target) {
OidcClient client = oidcClientManager.get(target);
if (client == null || !client.isAlwaysPermitted()
&& (!permissionManager.hasPermission(getCurrentUserId(), client.getClientName())
@@ -163,7 +160,7 @@ public class OidcSessionController extends BaseController {
*/
@PreAuthorize("authentication.authenticated")
@RequestMapping(value = "/logout/sid/{sid}", method = { RequestMethod.GET, RequestMethod.POST })
public void logoutBySid(@PathVariable("sid") String sid,
public void logoutBySid(@PathVariable String sid,
@RequestParam("redirect_url") Optional<String> redirectUrlParam, HttpServletRequest request,
HttpServletResponse response) throws IOException {
String issuer = oidcClientManager.getIssuer(request);
@@ -182,7 +179,7 @@ public class OidcSessionController extends BaseController {
*/
@PreAuthorize("authentication.authenticated")
@RequestMapping(value = "/logout/all/{target}", method = { RequestMethod.GET, RequestMethod.POST })
public void logoutAllForTarget(@PathVariable("target") Long target,
public void logoutAllForTarget(@PathVariable Long target,
@RequestParam("redirect_url") Optional<String> redirectUrlParam, HttpServletRequest request,
HttpServletResponse response) throws IOException {
String issuer = oidcClientManager.getIssuer(request);
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller;
import java.io.IOException;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller;
import org.springframework.beans.factory.annotation.Autowired;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller.model;
import java.util.List;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller.model;
import java.util.Set;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.controller.model;
import java.net.URI;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.model;
import java.util.Set;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.model;
import java.util.Set;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.model;
import jakarta.persistence.Column;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.model;
import java.time.Instant;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.repository;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.repository;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.repository;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -1,6 +1,3 @@
/**
*
*/
package de.bstly.we.oidc.repository;
import org.springframework.data.jpa.repository.JpaRepository;