protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) throws Exception {
HttpServletRequest req = (HttpServletRequest) request;
String token = getRequestToken(req);
if (StringUtils.isBlank(token)){
return null;
}
OAuth2Token oAuth2Token = new OAuth2Token(token);
return oAuth2Token;
}
为什么这里不是跟其他方法一样弄成resp.setStatus(HttpStatus.SC_UNAUTHORIZED);
resp.getWriter().print("无效的令牌");