{"id":16956992,"url":"https://github.com/jgraichen/omniauth-internal","last_synced_at":"2025-04-14T07:06:11.014Z","repository":{"id":3072414,"uuid":"4095545","full_name":"jgraichen/omniauth-internal","owner":"jgraichen","description":"OmniAuth strategy for simple model authentication.","archived":false,"fork":false,"pushed_at":"2022-02-25T18:30:28.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T16:46:17.698Z","etag":null,"topics":["authentication","omniauth","omniauth-strategy","password","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/jgraichen.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":"2012-04-21T11:08:16.000Z","updated_at":"2017-02-23T13:40:40.000Z","dependencies_parsed_at":"2022-07-21T21:47:13.986Z","dependency_job_id":null,"html_url":"https://github.com/jgraichen/omniauth-internal","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgraichen%2Fomniauth-internal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgraichen%2Fomniauth-internal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgraichen%2Fomniauth-internal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgraichen%2Fomniauth-internal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgraichen","download_url":"https://codeload.github.com/jgraichen/omniauth-internal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631689,"owners_count":21136562,"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":["authentication","omniauth","omniauth-strategy","password","ruby"],"created_at":"2024-10-13T22:16:34.973Z","updated_at":"2025-04-14T07:06:10.985Z","avatar_url":"https://github.com/jgraichen.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Omniauth::Internal\n\n**omniauth-internal** is a [OmniAuth](https://github.com/intridea/omniauth)\nstrategy to authenticate using Rails 3.1 `has_secure_password`\nby delegating to `User.authenticate(username, password)`.\n\n**omniauth-internal** can be used as an authenticator for\n[OmniAuth MultiPassword](https://github.com/jgraichen/omniauth-multipassword).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'omniauth-internal'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install omniauth-internal\n\n## Usage\n\nAdd a `authenticate` class method to your model:\n\n```ruby\n  def self.authenticate(login, password)\n    find_by_email(login).try(:authenticate, password)\n  end\n```\n\nYou can configure the model class used by **omniauth-internal**.\n\n```ruby\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :internal, :model =\u003e ::MyUser\nend\n```\n\n## Options\n\n** model **\nThe model to call `authenticate` on.\n(default: `User`)\n\n** title **\nThe title text shown on default login form.\n(default: `\"Restricted Access\"`)\n\n** fields **\nThe request parameter names to fetch username and password.\n(default: `[ \"username\", \"password\" ]`)\n\n\n## License\n\n[MIT License](http://www.opensource.org/licenses/mit-license.php)\n\nCopyright (c) 2012, Jan Graichen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgraichen%2Fomniauth-internal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgraichen%2Fomniauth-internal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgraichen%2Fomniauth-internal/lists"}