| | |
| | | private RandomValueAuthorizationCodeServices authorizationCodeServices; |
| | | @Autowired |
| | | private AuthenticationProvider daoAuhthenticationOauthProvider; |
| | | @Autowired |
| | | private SingleTokenServices tokenServices; |
| | | // @Autowired |
| | | // private SingleTokenServices tokenServices; |
| | | |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public Authentication authenticate(Authentication authentication) throws AuthenticationException { |
| | | String token = (String) authentication.getPrincipal(); |
| | | OAuth2Authentication auth = tokenServices.loadAuthentication(token); |
| | | OAuth2Authentication auth = KidgrowTokenServices().loadAuthentication(token); |
| | | if (auth == null) { |
| | | throw new InvalidTokenException("Invalid token: " + token); |
| | | } |