yc-passport-client
v1.0.17
Published
SSO Client Side of Yuechuang
Downloads
6
Readme
yc-passport-client
SSO Client Side of Yuechuang
用法:
const yc_pass_client = require('yc-passport-client');
const app = require('express');
...
app.get('/checkTicket', ycpass_client.checkTicket(ssoApiUrl, 30 * 24 * 60 * 60 * 1000, siteUrl));
app.get('*', ycpass_client.checkSid(ssoUrl, siteUrl, javaApiUrl));
...
app.post('/api', ycpass_client.forwardMiddleWare(javaApiUrl));
...
app.listen(app.get('port'), () => {
...
});
参数说明:
ssoUrl
: 登录跳转地址siteUrl
: 分站地址javaApiUrl
: 后台api地址ssoApiUrl
: 单点后台api地址