-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from 1223v/api
Fix: 유저 정보 조회 email -> id로 수정
- Loading branch information
Showing
6 changed files
with
81 additions
and
26 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/main/java/com/readyvery/readyverydemo/security/jwt/dto/CustomUserDetails.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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.readyvery.readyverydemo.security.jwt.dto; | ||
|
||
import java.util.Collection; | ||
|
||
import org.springframework.security.core.GrantedAuthority; | ||
import org.springframework.security.core.userdetails.UserDetails; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Builder | ||
@Getter | ||
public class CustomUserDetails implements UserDetails { | ||
|
||
private Long id; | ||
private String email; | ||
private String password; | ||
private Collection<? extends GrantedAuthority> authorities; | ||
|
||
@Override | ||
public String getUsername() { | ||
return email; | ||
} | ||
|
||
@Override | ||
public boolean isAccountNonExpired() { | ||
return true; // 혹은 실제 계정 상태에 따라 변경 | ||
} | ||
|
||
@Override | ||
public boolean isAccountNonLocked() { | ||
return true; // 혹은 실제 계정 상태에 따라 변경 | ||
} | ||
|
||
@Override | ||
public boolean isCredentialsNonExpired() { | ||
return true; // 혹은 실제 자격 증명 상태에 따라 변경 | ||
} | ||
|
||
@Override | ||
public boolean isEnabled() { | ||
return true; // 혹은 실제 계정 활성화 상태에 따라 변경 | ||
} | ||
} |
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
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
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