{"id":42164718,"url":"https://github.com/suninformation/ymate-module-oauth-connector","last_synced_at":"2026-01-26T20:51:21.646Z","repository":{"id":57737945,"uuid":"87192936","full_name":"suninformation/ymate-module-oauth-connector","owner":"suninformation","description":"基于YMP框架实现的第三方OAuth授权登录模块, 目前已实现GitHub、Weibo、Baidu、Wechat、OSChina、Gitee和QQ等;","archived":false,"fork":false,"pushed_at":"2019-04-15T09:25:44.000Z","size":57,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-11T06:06:32.333Z","etag":null,"topics":["connector","java","module","oauth2","web-mvc","ymp"],"latest_commit_sha":null,"homepage":"http://www.ymate.net/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suninformation.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":"2017-04-04T13:55:12.000Z","updated_at":"2020-09-11T06:59:09.000Z","dependencies_parsed_at":"2022-08-24T14:42:26.575Z","dependency_job_id":null,"html_url":"https://github.com/suninformation/ymate-module-oauth-connector","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/suninformation/ymate-module-oauth-connector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suninformation%2Fymate-module-oauth-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suninformation%2Fymate-module-oauth-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suninformation%2Fymate-module-oauth-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suninformation%2Fymate-module-oauth-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suninformation","download_url":"https://codeload.github.com/suninformation/ymate-module-oauth-connector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suninformation%2Fymate-module-oauth-connector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28787508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["connector","java","module","oauth2","web-mvc","ymp"],"created_at":"2026-01-26T20:51:21.050Z","updated_at":"2026-01-26T20:51:21.637Z","avatar_url":"https://github.com/suninformation.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"### YMP-OAuth-Connector\n\n基于YMP框架实现的第三方OAuth授权登录模块, 目前已实现:\n\n|授权名称|状态|\n|---|---|\n|github|通过|\n|weibo|通过|\n|baidu|通过|\n|qq|通过|\n|wechat|通过|\n|gitee|通过|\n|oschina|通过|\n|google|-|\n|linkedin|-|\n|windowslive|-|\n\n#### Maven包依赖\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003enet.ymate.module\u003c/groupId\u003e\n        \u003cartifactId\u003eymate-module-oauth-connector\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.1\u003c/version\u003e\n    \u003c/dependency\u003e\n\n\n#### 搭建模块工程\n\n- 首先，你需要创建一个基于YMPv2框架的JavaWeb工程项目；（[如何快速搭建工程?](https://gitee.com/suninformation/ymate-platform-v2/wikis/Quickstart_New)）\n\n- YMP框架扫描包路径要包含`net.ymate.module.oauth.connector`, 调整配置如下:\n\n        # 框架自动扫描的包路径集合，多个包名之间用'|'分隔，默认已包含net.ymate.platform包，其子包也将被扫描\n        ymp.autoscan_packages=net.ymate\n\n### 模块配置参数说明\n\n    #-------------------------------------\n    # module.oauth.connector 模块初始化参数\n    #-------------------------------------\n    \n    # 缓存名称前缀, 默认值: \"\"\n    ymp.configs.module.oauth.connector.cache_name_prefix=\n    \n    # 连接授权回调处理器, 默认值为net.ymate.cms.oauth.connector.impl.DefaultConnectCallbackHandler\n    ymp.configs.module.oauth.connector.callback_handler_class=\n    \n    # 密码类参数是否已加密, 默认值: false\n    ymp.configs.module.oauth.connector.password_encrypted=\n    \n    # 密码处理器, 可选参数, 用于对已加密OAuth客户端密钥进行解密，默认值: 空\n    ymp.configs.module.oauth.connector.password_class=\n    \n    #--------------------------\n    # 以下为各连接器的初始化配置, xxx表示连接器名称, 目前支持[github|wechat|qq|weibo|gitee|oschina|baidu]\n    #--------------------------\n    \n    # OAuth客户端ID, 必选项\n    ymp.configs.module.oauth.connector.xxx.client_id=\n    \n    # OAuth客户端密钥, 必选项\n    ymp.configs.module.oauth.connector.xxx.client_secret=\n    \n    # 重定向URL地址, 可选参数, 默认值: 空\n    ymp.configs.module.oauth.connector.xxx.redirect_uri=\n\n#### 启动并测试\n\n- 申请并配置好OAuth客户端ID和密钥(访问`https://github.com/settings/developers`进行申请);\n\n- 在申请过程中需要填写`redirect_uri`地址, 请填写: `http://\u003c你的域名\u003e/oauth2/connect/github/redirect`;\n\n- 打包工程并部署到目标服务器;\n\n- 打开浏览器并输入网址, 如: `http://\u003c你的域名\u003e/oauth2/connect/github` 进行授权测试;\n\n- 如果OAuth请求授权成功，则默认`callback_handler_class`处理器将为你显示回应的JSON数据, 接下来请自行编写`IOAuthConnectCallbackHandler`接口实现来存储授权信息吧:)\n\n#### One More Thing\n\nYMP不仅提供便捷的Web及其它Java项目的快速开发体验，也将不断提供更多丰富的项目实践经验。\n\n感兴趣的小伙伴儿们可以加入 官方QQ群480374360，一起交流学习，帮助YMP成长！\n\n了解更多有关YMP框架的内容，请访问官网：http://www.ymate.net/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuninformation%2Fymate-module-oauth-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuninformation%2Fymate-module-oauth-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuninformation%2Fymate-module-oauth-connector/lists"}