We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议使用jwt作为验证数据的方式 server 生成jwt后重定向到client 并携带token client 接收到token后 储存到localstore 或者保存到cookie server 获取并验证token
1.后端跨域设置 { credentials: true, origin: 'http://10.235.171.233:4445' 其他参数自行:google } 2.前端跨域设置 export async function getDeviceProfile(v) { return axios({ url: 'http://10.235.171.233:9000/api/profile/bi/detail/'+v, method: 'get', withCredentials: true, //携带cookie 以便验证用户 }); }
server:验证cookie(jwt)失效或者没有登陆后,返回: 401 msg:faild client:axios请求封装,请求异常统一处理 如果返回status code是401 则前端跳转到 cas登陆页面,如: https://cas.test.cn/login?service=http://api.test.com/login?from=http://www.test.com 备注: 测试时,api.test.com www.test.com 请换陈自己前后端服务的完整url
HTTP访问控制CORS详解 前端需要了解的 SSO 与 CAS 知识
The text was updated successfully, but these errors were encountered:
No branches or pull requests
cas client与server验证
建议使用jwt作为验证数据的方式
server 生成jwt后重定向到client 并携带token
client 接收到token后 储存到localstore 或者保存到cookie
server 获取并验证token
跨域设置(已废弃)jwt失效后后重新登陆的问题
相关文档
HTTP访问控制CORS详解
前端需要了解的 SSO 与 CAS 知识
The text was updated successfully, but these errors were encountered: