{"id":26919166,"url":"https://github.com/wsfe/yapi-plugin-sso","last_synced_at":"2025-04-01T21:30:30.465Z","repository":{"id":57403182,"uuid":"241064233","full_name":"wsfe/yapi-plugin-sso","owner":"wsfe","description":"基于sso的登录","archived":false,"fork":false,"pushed_at":"2020-02-17T10:16:23.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T05:04:21.696Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wsfe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-17T09:13:14.000Z","updated_at":"2020-02-17T10:16:25.000Z","dependencies_parsed_at":"2022-09-18T12:11:54.244Z","dependency_job_id":null,"html_url":"https://github.com/wsfe/yapi-plugin-sso","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsfe%2Fyapi-plugin-sso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsfe%2Fyapi-plugin-sso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsfe%2Fyapi-plugin-sso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wsfe%2Fyapi-plugin-sso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wsfe","download_url":"https://codeload.github.com/wsfe/yapi-plugin-sso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246712875,"owners_count":20821810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-01T21:30:29.761Z","updated_at":"2025-04-01T21:30:30.455Z","avatar_url":"https://github.com/wsfe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yapi-plugin-sso\n第三方sso登录插件，由于每家公司不一样登录，验证等接口的传参，返回参数等都会有所不同，所以大家根据自身情况去修改。\n配置方法如下：\n\n第一步： 在生成的配置文件config.json中加入如下配置：\n\n```\n\"plugins\": [\n  {\n    \"name\": \"sso\",\n    \"options\": {\n      \"type\": \"sso\",\n      \"loginServer\": \"http://sso.example.com/sso/login\",\n      \"authServer\" : \"https://sso.example.com/sso/serviceValidate\",\n      \"emailPostfix\": \"@163.com\",\n      \"btnText\": \"SSO登录\"\n    }\n  }\n]\n```\n这里面的配置项含义如下：\n\n- type 登陆类型，目前只支持sso登陆\n- loginServer 点击登陆按钮式需要跳转的url，用户通过该页面登录以后会向服务器发送一个token\n- emailPostfix 登陆邮箱后缀\n- authServer 服务端在获取token之后，可以通过这个url来获取用户的详细信息\n- btnText 登录按钮名称\n第二步：在config.json 这层目录下运行 yapi plugin --name yapi-plugin-sso --build 重新下载插件并重新构建。如果是内部私有仓库，那么直接进去venders文件夹下面安装`npm i yapi-plugin-sso`，并执行`ykit pack -m`\n\n第三步： 重启服务器\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsfe%2Fyapi-plugin-sso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwsfe%2Fyapi-plugin-sso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwsfe%2Fyapi-plugin-sso/lists"}