Add basic auth spring security configuration.

This commit is contained in:
Florian THIERRY
2023-11-28 15:17:46 +01:00
parent 025197525c
commit 914785a29b
11 changed files with 191 additions and 10 deletions

View File

@@ -17,6 +17,14 @@
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.sportshub</groupId>
<artifactId>sportshub-application</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-data-jpa</artifactId>-->
@@ -25,11 +33,6 @@
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.postgresql</groupId>-->
<!-- <artifactId>postgresql</artifactId>-->

View File

@@ -1,8 +1,10 @@
package org.sportshub.exposition.user;
import java.util.UUID;
import java.util.List;
import org.sportshub.application.user.UserUseCases;
import org.sportshub.domain.user.model.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -16,8 +18,13 @@ public class UserController {
this.userUseCases = userUseCases;
}
@PostMapping
@PostMapping("/login")
public String login() {
return "";
}
@GetMapping
public List<User> findAll() {
return userUseCases.findAll();
}
}