Socket
Socket
Sign inDemoInstall

yapi-plugin-psso

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    yapi-plugin-psso

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


Version published
Weekly downloads
1
Maintainers
1
Install size
3.55 kB
Created
Weekly downloads
 

Readme

Source

yapi-plugin-psso

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

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

"plugins": [
    {
      "name": "psso",
      "options": {
        "type": "sso",
        "loginUrl": "http://sso.example.com/service/verifytoken.php?token=",
        "AUTH_SERVER" : "https://sso.example.com/login.php"
      }
    }
  ]

配置项含义如下:

  • type 登陆类型,目前只支持sso登陆
  • loginUrl 服务端在获取token之后,可以通过这个url来获取用户的详细信息,返回体示例如下:
{
  "data": {
    "username": 'test',
    "mail": 'test@test.com'
  }
}
  • AUTH_SERVER 点击登陆按钮式需要跳转的url,用户通过该页面登录以后会向服务器发送一个token

第二步:在config.json 这层目录下运行 yapi plugin --name yapi-plugin-psso 重新下载插件

第三步: 重启服务器

FAQs

Last updated on 24 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc