日期:2014-05-16  浏览次数:21468 次

oauth2.0怎么验证accesstoken是否正确或合法

验证access_token流程  OAuth2AuthenticationProcessingFilter 类
Authentication authResult = authenticationManager.authenticate(authentication);
——》OAuth2AuthenticationManager authenticate 方法  OAuth2Authentication auth = tokenServices.loadAuthentication(token);
——》DefaultTokenServices  loadAuthentication 方法 OAuth2AccessToken accessToken = tokenStore.readAccessToken(accessTokenValue);
——》JdbcTokenStore readAccessToken 方法