diff --git a/.forge/BAIS-SPRING-DEV-AUTH-001-attempt-1.md b/.forge/BAIS-SPRING-DEV-AUTH-001-attempt-1.md new file mode 100644 index 0000000..76a334c --- /dev/null +++ b/.forge/BAIS-SPRING-DEV-AUTH-001-attempt-1.md @@ -0,0 +1,3 @@ +# BAIS-SPRING-DEV-AUTH-001-attempt-1 + +Forge 이슈 작업 브랜치 `forge/BAIS-SPRING-DEV-AUTH-001-attempt-1`. diff --git a/src/main/java/com/example/authentication/Sau02f220uDto.java b/src/main/java/com/example/authentication/Sau02f220uDto.java new file mode 100644 index 0000000..ed9c12b --- /dev/null +++ b/src/main/java/com/example/authentication/Sau02f220uDto.java @@ -0,0 +1,23 @@ +package com.example.authentication; + +public class Sau02f220uDto { + private String username; + private String password; + + // Getters and Setters + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } +} \ No newline at end of file diff --git a/src/main/java/com/example/authentication/Sau02f220uRepository.java b/src/main/java/com/example/authentication/Sau02f220uRepository.java new file mode 100644 index 0000000..892bf3c --- /dev/null +++ b/src/main/java/com/example/authentication/Sau02f220uRepository.java @@ -0,0 +1,10 @@ +package com.example.authentication; + +import org.springframework.stereotype.Repository; + +@Repository +public class Sau02f220uRepository { + public void save(Sau02f220uDto dto) { + // Save logic here + } +} \ No newline at end of file diff --git a/src/main/java/com/example/authentication/Sau02f220uService.java b/src/main/java/com/example/authentication/Sau02f220uService.java new file mode 100644 index 0000000..7bc9e0a --- /dev/null +++ b/src/main/java/com/example/authentication/Sau02f220uService.java @@ -0,0 +1,10 @@ +package com.example.authentication; + +import org.springframework.stereotype.Service; + +@Service +public class Sau02f220uService { + public void authenticate(Sau02f220uDto dto) { + // Authentication logic here + } +} \ No newline at end of file diff --git a/src/main/java/com/example/authorization/Maz02f116rDto.java b/src/main/java/com/example/authorization/Maz02f116rDto.java new file mode 100644 index 0000000..a17f0c3 --- /dev/null +++ b/src/main/java/com/example/authorization/Maz02f116rDto.java @@ -0,0 +1,23 @@ +package com.example.authorization; + +public class Maz02f116rDto { + private String role; + private String permissions; + + // Getters and Setters + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getPermissions() { + return permissions; + } + + public void setPermissions(String permissions) { + this.permissions = permissions; + } +} \ No newline at end of file diff --git a/src/main/java/com/example/authorization/Maz02f116rRepository.java b/src/main/java/com/example/authorization/Maz02f116rRepository.java new file mode 100644 index 0000000..de96263 --- /dev/null +++ b/src/main/java/com/example/authorization/Maz02f116rRepository.java @@ -0,0 +1,10 @@ +package com.example.authorization; + +import org.springframework.stereotype.Repository; + +@Repository +public class Maz02f116rRepository { + public void save(Maz02f116rDto dto) { + // Save logic here + } +} \ No newline at end of file diff --git a/src/main/java/com/example/authorization/Maz02f116rService.java b/src/main/java/com/example/authorization/Maz02f116rService.java new file mode 100644 index 0000000..7a7a0ef --- /dev/null +++ b/src/main/java/com/example/authorization/Maz02f116rService.java @@ -0,0 +1,10 @@ +package com.example.authorization; + +import org.springframework.stereotype.Service; + +@Service +public class Maz02f116rService { + public void authorize(Maz02f116rDto dto) { + // Authorization logic here + } +} \ No newline at end of file diff --git a/src/test/java/com/example/authentication/Sau02f220uServiceTest.java b/src/test/java/com/example/authentication/Sau02f220uServiceTest.java new file mode 100644 index 0000000..7a60736 --- /dev/null +++ b/src/test/java/com/example/authentication/Sau02f220uServiceTest.java @@ -0,0 +1,17 @@ +package com.example.authentication; + +import org.junit.jupiter.api.Test; +import static org.mockito.Mockito.*; + +class Sau02f220uServiceTest { + @Test + void testAuthenticate() { + Sau02f220uService service = new Sau02f220uService(); + Sau02f220uDto dto = new Sau02f220uDto(); + dto.setUsername("testUser"); + dto.setPassword("testPass"); + + service.authenticate(dto); + // Add assertions here + } +} \ No newline at end of file diff --git a/src/test/java/com/example/authorization/Maz02f116rServiceTest.java b/src/test/java/com/example/authorization/Maz02f116rServiceTest.java new file mode 100644 index 0000000..dfe8405 --- /dev/null +++ b/src/test/java/com/example/authorization/Maz02f116rServiceTest.java @@ -0,0 +1,17 @@ +package com.example.authorization; + +import org.junit.jupiter.api.Test; +import static org.mockito.Mockito.*; + +class Maz02f116rServiceTest { + @Test + void testAuthorize() { + Maz02f116rService service = new Maz02f116rService(); + Maz02f116rDto dto = new Maz02f116rDto(); + dto.setRole("admin"); + dto.setPermissions("read, write"); + + service.authorize(dto); + // Add assertions here + } +} \ No newline at end of file