Skip to content

Commit 324dc22

Browse files
committed
refactor: Modify MemberService (#3)
1 parent 64cfe2a commit 324dc22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server-toy-project/src/main/java/com/gdsc_teamb/servertoyproject/login/MemberService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.gdsc_teamb.servertoyproject.login;
22

3-
import com.gdsc_teamb.servertoyproject.jwt.TokenInfo;
3+
import com.gdsc_teamb.servertoyproject.jwt.JwtToken;
44
import com.gdsc_teamb.servertoyproject.jwt.JwtTokenProvider;
55
import lombok.RequiredArgsConstructor;
66
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -19,7 +19,7 @@ public class MemberService {
1919
private final JwtTokenProvider jwtTokenProvider;
2020

2121
@Transactional
22-
public TokenInfo login(String memberId, String password) {
22+
public JwtToken login(String memberId, String password) {
2323
// 1. Login ID/PW 를 기반으로 Authentication 객체 생성
2424
// 이때 authentication 는 인증 여부를 확인하는 authenticated 값이 false
2525
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(memberId, password);
@@ -29,8 +29,8 @@ public TokenInfo login(String memberId, String password) {
2929
Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken);
3030

3131
// 3. 인증 정보를 기반으로 JWT 토큰 생성
32-
TokenInfo tokenInfo = jwtTokenProvider.generateToken(authentication);
32+
JwtToken jwtToken = jwtTokenProvider.generateToken(authentication);
3333

34-
return tokenInfo;
34+
return jwtToken;
3535
}
3636
}

0 commit comments

Comments
 (0)