npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yapi-plugin-yachsso

v2.1.1

Published

yapi的通用组件SSO插件

Downloads

12

Readme

yapi-plugin-yachsso

yapi集成Yach通用组件SSO插件

使用

第一步: 在通用组件申请一个应用,

申请应用的表单内,单点登录回调地址示意如下:

https://yapi.xxxx.com/api/user/login_by_token

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

"plugins": [
    {
      "name": "yachsso", 
      "options": {
        "type": "sso", // 登陆类型,目前只支持sso登陆
        "appid": "",    // 申请的应用id
        "appkey": "",   // 申请的应用key
        "ssoLoginUrl": "https://sso.100tal.com/portal/login", // 点击登录按钮需要跳转的SSO域名
        "ssoApiUrl" : "https://api.service.100tal.com",  // SSO扫码后的验证接口域名     
        "mode" : "mixin" // 只保留SSO登录,还是和Yapi原登录共存。mixin(共存,默认)、along(只保留SSO登录)
      }
    }
]

注意,mode为along时,请使用基于官方yapi二次开发的yach内部版本.

第三步:在config.json 这层目录下安装插件


$ yapi plugin --name yapi-plugin-yachsso #下载插件
  • 如果提示需要安装ykit,则执行下
$ yarn global add ykit
  • 如果yachsso插件安装失败,则手动安装并编译插件
$ cd vendors
$ yarn add yapi-plugin-yachsso
$ ykit pack -m # 因为涉及到react模板 所以需要pack  如果只是改server.js 则无需pack

第四步: 重启服务器


$ pm2 restart server/app.js

发布日志

2.1.1

2020-07-12

  • 🌟 调整跳转逻辑

2.0.2

2020-07-12

  • 🌟 server增加参数mode、ssoLogoutUrl

2.0.1

2020-07-12

  • 🐞 修复along模式跳转错误

2.0.0

2020-07-11

  • 🆕 增加mode参数:mixin、along。分别代表和原登录共存、替换原登录
  • 🆕 考虑语义化,参数调整,不兼容1.x