{"id":15357063,"url":"https://github.com/1c7/authing_ruby","last_synced_at":"2025-04-15T06:43:03.449Z","repository":{"id":50235749,"uuid":"360218195","full_name":"1c7/authing_ruby","owner":"1c7","description":"Authing 的 Ruby SDK","archived":false,"fork":false,"pushed_at":"2021-06-30T12:20:21.000Z","size":314,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-15T06:42:56.265Z","etag":null,"topics":["authing","rails","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/authing_ruby","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1c7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-21T15:25:21.000Z","updated_at":"2023-07-20T08:03:27.000Z","dependencies_parsed_at":"2022-09-06T10:40:19.841Z","dependency_job_id":null,"html_url":"https://github.com/1c7/authing_ruby","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1c7%2Fauthing_ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1c7%2Fauthing_ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1c7%2Fauthing_ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1c7%2Fauthing_ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1c7","download_url":"https://codeload.github.com/1c7/authing_ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023727,"owners_count":21199958,"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":["authing","rails","ruby"],"created_at":"2024-10-01T12:32:46.313Z","updated_at":"2025-04-15T06:43:03.430Z","avatar_url":"https://github.com/1c7.png","language":"Ruby","readme":"# Authing Ruby SDK - [Ruby Gems 地址](https://rubygems.org/gems/authing_ruby)\n这里是 [Authing](https://www.authing.cn/) 的 Ruby SDK  \n\n## 如何安装\nGemfile 中写上\n```\ngem \"authing_ruby\"\n```\n\n或者\n```\ngem install authing_ruby\n```\n\n## 基本例子(用户名+密码进行注册)\n```ruby\nrequire 'authing_ruby'\n\noptions = {\n  appId: \"appId 填写应用 id, 如 60800b9151d040af9016d60b, 应用-\u003eApp ID\",\n  appHost: \"appHost 例子: https://rails-demo.authing.cn, 应用-\u003e基础设置-\u003e认证地址\",\n}\nauthenticationClient = AuthingRuby::AuthenticationClient.new(options)\nusername = \"user#{rand(0...9999)}\" # 用户名\npassword = \"12345678\" # 密码\nresp = authenticationClient.registerByUsername(username, password)\nputs resp # 返回注册成功的用户信息\n```\n这个例子来自于 [example/2.registerByUsername.rb](./example/2.registerByUsername.rb)\n\n## 如何使用\n1. [`example/`](example/) 目录有使用例子\n1. Ruby SDK 是参照 JS SDK 实现的。方法名，参数完全一致，可以翻阅 [JS/Node SDK 文档](https://docs.authing.cn/v2/reference/sdk-for-node/) 参考\n1. 也可以参照测试代码 [`lib/test/mini_test/`](./lib/test/mini_test) 进行使用。\n1. 目前实现了最常用最基础的功能，而不是 100% 的 Authing API (因为实在太多)，具体实现了什么功能，参照 [`doc/README.md`](./doc/README.md)\n1. 这个 gem 说到底只是一个工具，重点是使用 Authing 本身，所以务必阅读 Authing 的文档，理解核心概念\n\n## 时间表\n* 发布 `1.1.1` 版：2021-6-1\n* 发布 `1.1.0` 版：2021-5-25\n* 发布 `1.0.9` 版：2021-5-25\n* 发布 `1.0.8` 版：2021-5-13\n* 发布 `1.0.7` 版：2021-5\n* 发布 `1.0.0` 版：2021-4-30\n* 写下第一行代码: 2021-4-22\n\n## Ruby on Rails 参考项目   \n这个 gem 可以单独使用，非 Rails 项目也可以用，因为本质上它只是发 GraphQL HTTP 请求而已。           \n但如果你希望在 `Ruby on Rails` 项目中使用这个 Ruby SDK，希望找例子参考。  \n例子: https://github.com/1c7/authing_ruby_rails_example\n\n### [更多文档请阅读](doc/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1c7%2Fauthing_ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1c7%2Fauthing_ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1c7%2Fauthing_ruby/lists"}