-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
18 additions
and
281 deletions.
There are no files selected for viewing
44 changes: 0 additions & 44 deletions
44
src/main/java/com/example/kfanboy/global/common/LoginCheckInterceptor.java
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
src/main/java/com/example/kfanboy/global/common/LoginUserArgumentResolver.java
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
src/main/java/com/example/kfanboy/global/common/annotation/CurrentUser.java
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
src/main/java/com/example/kfanboy/global/common/annotation/LoginCheck.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
src/main/java/com/example/kfanboy/global/util/BcryptPasswordEncryptor.java
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/main/java/com/example/kfanboy/global/util/PasswordEncryptor.java
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/main/java/com/example/kfanboy/global/util/SessionKey.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
src/main/java/com/example/kfanboy/member/controller/MemberController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,13 @@ | ||
package com.example.kfanboy.member.controller; | ||
|
||
import static com.example.kfanboy.global.common.response.ResponseHandler.*; | ||
|
||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import com.example.kfanboy.global.common.SuccessMessage; | ||
import com.example.kfanboy.global.common.annotation.LoginCheck; | ||
import com.example.kfanboy.global.common.response.ResponseDto; | ||
import com.example.kfanboy.member.dto.LoginDto; | ||
import com.example.kfanboy.member.service.LoginService; | ||
|
||
import jakarta.validation.Valid; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping(value = "/api/member") | ||
public class MemberController { | ||
|
||
private final LoginService loginService; | ||
|
||
@PostMapping(value = "/login") | ||
public ResponseEntity<ResponseDto<?>> login(@RequestBody @Valid final LoginDto loginDto) { | ||
loginService.login(loginDto); | ||
return success(HttpStatus.OK, SuccessMessage.LOGIN_SUCCESS); | ||
} | ||
|
||
@LoginCheck | ||
@GetMapping("/logout") | ||
public ResponseEntity<ResponseDto<?>> logout() { | ||
loginService.logout(); | ||
return success(HttpStatus.OK, SuccessMessage.LOGOUT_SUCCESS); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/kfanboy/member/domain/entity/UserRole.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.example.kfanboy.member.domain.entity; | ||
|
||
public enum UserRole { | ||
ROLE_ADMIN, ROLE_USER | ||
ADMIN, USER | ||
} |
3 changes: 0 additions & 3 deletions
3
src/main/java/com/example/kfanboy/member/domain/repository/MemberRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
package com.example.kfanboy.member.domain.repository; | ||
|
||
import java.util.Optional; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import com.example.kfanboy.member.domain.entity.Member; | ||
|
||
@Repository | ||
public interface MemberRepository extends JpaRepository<Member, Long> { | ||
Optional<Member> findByEmail(final String email); | ||
} |
11 changes: 0 additions & 11 deletions
11
src/main/java/com/example/kfanboy/member/dto/LoginDto.java
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
src/main/java/com/example/kfanboy/member/service/LoginService.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.