|
|
@@ -24,6 +24,7 @@ import org.springframework.security.authentication.BadCredentialsException;
|
|
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
|
|
import org.springframework.security.core.Authentication;
|
|
|
import org.springframework.security.core.context.SecurityContextHolder;
|
|
|
+import org.springframework.security.core.userdetails.UserDetails;
|
|
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -139,18 +140,5 @@ public class AuthenticationServiceImpl implements AuthenticationService {
|
|
|
return MyResponse.success(userLoginVO);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public MyResponse authToken(String token) {
|
|
|
- String phone = jwtTokenUtil.parseToken(token);
|
|
|
- System.out.println("official number :" + phone);
|
|
|
- UserLoginVO userLoginVO = ModelMapperUtil.map(userMapper.selectByPhone(phone), UserLoginVO.class);
|
|
|
- if(userLoginVO != null){
|
|
|
- userLoginVO.setToken(token);
|
|
|
- return MyResponse.success(userLoginVO);
|
|
|
- } else {
|
|
|
- return MyResponse.error(400,"登录失败");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
}
|