|
@@ -20,9 +20,6 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
|
|
|
private UserDetailsService userDetailsService;
|
|
|
|
|
|
private SmsCodeService smsCodeService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private RedisTemplate<String,String> redisTemplate;
|
|
|
@Override
|
|
|
protected void additionalAuthenticationChecks(UserDetails userDetails, Authentication authentication) throws AuthenticationException {
|
|
|
if (authentication.getCredentials() == null) {
|
|
@@ -59,7 +56,6 @@ public class PhoneAuthenticationProvider extends AbstractAuthenticationProvider
|
|
|
protected Authentication createSuccessAuthentication(Object principal, Authentication authentication, UserDetails user) {
|
|
|
PhoneAuthenticationToken result = new PhoneAuthenticationToken(principal, authentication.getCredentials(), user.getAuthorities());
|
|
|
result.setDetails(authentication.getDetails());
|
|
|
- redisTemplate.opsForValue().set(user.getUsername(),JSON.toJSONString(user));
|
|
|
return result;
|
|
|
}
|
|
|
|