Skip to content

Commit

Permalink
Revert "feat: 카카오 소셜 로그인 구현"
Browse files Browse the repository at this point in the history
This reverts commit d7ab75d.
  • Loading branch information
GimHaLim committed Jun 2, 2024
1 parent 417f360 commit 2cc2880
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 197 deletions.
118 changes: 0 additions & 118 deletions src/main/java/com/soongsil/poppin/user/application/MemberService.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundEx
}

UserDto userDto = new UserDto(
member.getUserId(),
member.getName(),
member.getEmail(),
member.getPassword(),
member.getNickName(),
member.isSocial()
member.getNickName()
);

log.info(userDto);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,29 @@
import java.util.Map;

public class UserDto extends User {
Long id;
private String name, email, password, nickname, role;
private boolean social;

public UserDto(Long id, String name, String email, String password, String nickname, boolean social) {
public UserDto(String name, String email, String password, String nickname) {
super(
email,
password,
Collections.singleton(new SimpleGrantedAuthority("ROLE_USER"))
);
this.id = id;
this.name = name;
this.email = email;
this.password = password;
this.nickname = nickname;
this.role = "ROLE_USER";
this.social = social;
}

public Map<String, Object> getClaims() {
Map<String, Object> dataMap = new HashMap<>();

dataMap.put("id", id);
dataMap.put("name", name);
dataMap.put("email", email);
dataMap.put("password", password);
dataMap.put("nickname", nickname);
dataMap.put("role", role);
dataMap.put("social", social);

return dataMap;
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/soongsil/poppin/user/domain/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import com.soongsil.poppin.heart.domain.Heart;
import com.soongsil.poppin.userchat.domain.UserChat;
import jakarta.persistence.*;
import lombok.*;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
@Entity
@Table(name="user")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand Down Expand Up @@ -49,13 +51,11 @@ public class Member {
private List<UserChat> userChat;

@Builder
public Member(String name, String email, String password, String nickName, boolean social)
{
public Member(String name, String email, String password, String nickName){
this.name = name;
this.email =email;
this.password = password;
this.nickName = nickName;
this.social = social;
}

@PrePersist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@
public interface UserRepository extends JpaRepository<Member, Long> {
@Query("select m from Member m where m.email = :email")
Member getWithEmail(@Param("email") String email);

Member findBynickName(String nickName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ protected boolean shouldNotFilter(HttpServletRequest request) throws ServletExce
return true;
}

//이미지 조회 경로는 체크하지 않는다면
if(path.startsWith("/v1/popup/random-images")) {
log.info("건너뛰기");
return true;
}
// //이미지 조회 경로는 체크하지 않는다면
// if(path.startsWith("/api/products/view/")) {
// return true;
// }

return false;
}
Expand All @@ -58,14 +57,12 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
Map<String, Object> claims = JWTUtil.validateToken(token);
System.out.println("JWT claims: " + claims);

Long id = (Long) claims.get("id");
String name = (String) claims.get("name");
String email = (String) claims.get("email");
String password = (String) claims.get("password");
String nickname = (String) claims.get("nickname");
boolean social = (boolean) claims.get("social");

UserDto userDto = new UserDto(id, name, email, password, nickname, social);
UserDto userDto = new UserDto(name, email, password, nickname);

log.info("-----------------------------------");
log.info(userDto);
Expand Down

This file was deleted.

0 comments on commit 2cc2880

Please sign in to comment.