TODO: Spring-Security -> Principal aus Header bestimmen annotation-interceptor
authorKai Moritz <kai@juplo.de>
Mon, 10 Apr 2023 15:08:45 +0000 (17:08 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 10 Apr 2023 15:46:36 +0000 (17:46 +0200)
- Hier ist beschrieben, wie der Mechanismus für eine Login-URL erweitert
  werden kann:
  https://stackoverflow.com/questions/61726043/how-to-create-a-principal-based-on-an-arbitrary-http-header
- Wahrscheinlich wird aber eher ein Mechanismus ähnlich den
  RememberMeServices benötigt.
- Oder ähnlich dem Umgang mit OAuth2-Tokens, die bei jedem Request
  vorhanden sind und aus denen der Principal dann auf Per-Request-Basis
  wiederhergestellt wird.

pom.xml

diff --git a/pom.xml b/pom.xml
index b6262c5..6676a43 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-web</artifactId>
                </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-security</artifactId>
+               </dependency>
                <dependency>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <artifactId>spring-boot-starter-test</artifactId>
                        <scope>test</scope>
                </dependency>
+               <dependency>
+                       <groupId>org.springframework.security</groupId>
+                       <artifactId>spring-security-test</artifactId>
+                       <scope>test</scope>
+               </dependency>
                <dependency>
                        <groupId>org.assertj</groupId>
                        <artifactId>assertj-core</artifactId>