1 Star 0 Fork 0

Mr Biiiiiiig / yapi-plugin-cas

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

yapi-plugin-cas

第三方cas登录插件,配置方法如下:

第一步: 在生成的配置文件config.json中加入如下配置:

"plugins": [
  {
    "name": "cas",
    "options": {
      "type": "cas",
      "LOGIN_SERVER": "http://cas.example.com/cas/login",
      "AUTH_SERVER" : "https://cas.example.com/cas/serviceValidate",
      "emailPostfix": "@163.com",
    }
  }
]

这里面的配置项含义如下:

  • type 登陆类型,目前只支持cas登陆
  • loginUrl 服务端在获取token之后,可以通过这个url来获取用户的详细信息
  • emailPostfix 登陆邮箱后缀
  • AUTH_SERVER 点击登陆按钮式需要跳转的url,用户通过该页面登录以后会向服务器发送一个token 第二步:在config.json 这层目录下运行 yapi plugin --name yapi-plugin-cas 重新下载插件

第三步: 重启服务器

MIT License Copyright (c) 2018 wsfe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

YAPI CAS登陆插件 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mrbiiiiiiig/yapi-plugin-cas.git
git@gitee.com:mrbiiiiiiig/yapi-plugin-cas.git
mrbiiiiiiig
yapi-plugin-cas
yapi-plugin-cas
master

搜索帮助