{"id":16062000,"url":"https://github.com/rossta/opensesame-github","last_synced_at":"2025-02-23T01:15:00.934Z","repository":{"id":2835001,"uuid":"3837981","full_name":"rossta/opensesame-github","owner":"rossta","description":"Company walled-garden authentication via github organizations","archived":false,"fork":false,"pushed_at":"2012-08-14T21:52:20.000Z","size":108,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T10:57:02.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/rossta/opensesame-github","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/rossta.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":"2012-03-26T22:13:17.000Z","updated_at":"2014-03-12T19:29:04.000Z","dependencies_parsed_at":"2022-08-26T19:11:18.462Z","dependency_job_id":null,"html_url":"https://github.com/rossta/opensesame-github","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossta%2Fopensesame-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossta%2Fopensesame-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossta%2Fopensesame-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rossta%2Fopensesame-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rossta","download_url":"https://codeload.github.com/rossta/opensesame-github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254288,"owners_count":19772392,"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":"2024-10-09T04:21:19.200Z","updated_at":"2025-02-23T01:15:00.890Z","avatar_url":"https://github.com/rossta.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenSesame\n\nOpenSesame-Github is a [Warden](https://github.com/hassox/warden) strategy for providing \"walled garden\" authentication for access to Rack-based applications via Omniauth. For example, your company has internal apps and/or staging enviroments for multiple projects and you want something better than HTTP basic auth. The intent is protect the visibility of your app from the outside world.\n\nEnter OpenSesame-Github. To authenticate, OpenSesame-Github currently uses Omniauth and the Github API to require that a user is both logged in to Github and a member of the configurable Github organization. You can use any other authentication framework or strategy behind the OpenSesame-Github to authenticate your current user.\n\n## Usage\n\nRegister your application(s) with Github for OAuth access. For each application, you need a name, the site url,\nand a callback for OAuth. The OmniAuth-Github OAuth strategy used under the hood will expect the callback at '/auth/github/callback'. So the development version of your client application might be registered as:\n\n    Name: MyApp - local\n    URL: http://localhost:3000\n    Callback URL: http://localhost:3000/auth/github/callback\n\nIn your Gemfile:\n\n    $ gem \"opensesame-github\"\n\nInsert the middleware components in your Rails `config/initializers` or in your Sinatra/Rack app file:\n\nRails\n\n```ruby\n# Rails config/initializers/omniauth.rb\nRails.application.config.middleware.use OmniAuth::Strategies::GitHub,\n  GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET\n\nRails.application.config.middleware.use Warden::Manager do |manager|\n  manager.scope_defaults :team_member, :strategies =\u003e [:opensesame_github]\n  manager.failure_app = lambda { |env| HomeController.action(:show).call(env) }\nend\n```\n\nSinatra/Rack\n\n```ruby\n# Sinatra app.rb\nrequire 'opensesame-github'\n\nclass MyApplication \u003c Sinatra::Base\n  # ...\n\n  use OmniAuth::Strategies::GitHub, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET\n\n  use Warden::Manager do |manager|\n    manager.scope_defaults :team_member, :strategies =\u003e [:opensesame_github]\n    manager.failure_app = lambda { |env| HomeController.action(:show).call(env) }\n  end\nend\n```\n\nConfigure your Github organization:\n\n```ruby\n# Rails config/initializers/omniauth.rb or Sinatra app.rb\n\nOpenSesame::Github.organization_name = 'challengepost'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frossta%2Fopensesame-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frossta%2Fopensesame-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frossta%2Fopensesame-github/lists"}