LeoHeo / collect

e-commerce toy project (WIP)
MIT License
4 stars 0 forks source link

Spring Security UserDetails & UserDetailsService #4

Open LeoHeo opened 6 years ago

LeoHeo commented 6 years ago

springboot-jwt-starter

LeoHeo commented 6 years ago

authorities라는 권한관리 Entity가 필요함

LeoHeo commented 6 years ago

auth0의 implementing-jwt-authentication-on-spring-boot를 간단해보여서 한번 따라해봤지만 얘는 너무 허술한거 같다.

LeoHeo commented 6 years ago

UserDetails 구현

https://github.com/LeoHeo/collect/blob/3e050adef354cdbd73b6890f9f61c23612271300/src/main/java/com/collect/security/JwtUser.java#L14-L84

UserDetailsService 구현

https://github.com/LeoHeo/collect/blob/3e050adef354cdbd73b6890f9f61c23612271300/src/main/java/com/collect/security/JwtUserDetailsService.java#L15-L35