我已经下载了oauth2服务器的JWT版本(https://github.com/spring-guides/tut-spring-security-and-angular-js/tree/master/oauth2),我一直在尝试使用angularjs将默认登录表单替换为另一个。
我做的是:
`
@RequestMapping(value = {"/login"})
public String redirect(@RequestParam(required = false) String code, @RequestParam(required = false) String state) {
return "redirect:/#/login";
}
`
`
var params = {username: credentials.username, password: credentials.password};
var config = {
headers: {'content-type': 'application/x-www-form-urlencoded; charset=utf-8'}
};
CoreService.httpPost('login', $httpParamSerializer(params), config)
.then( function(data) {...});
`
但是,如果我刷新IU页面,则令牌验证工作正常
那么,你能告诉我我要做什么或我做错了什么吗?
非常感谢