{"action":"created","issue":{"url":"https://api.github.com/repos/bethesque/pact_broker/issues/47","repository_url":"https://api.github.com/repos/bethesque/pact_broker","labels_url":"https://api.github.com/repos/bethesque/pact_broker/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/bethesque/pact_broker/issues/47/comments","events_url":"https://api.github.com/repos/bethesque/pact_broker/issues/47/events","html_url":"https://github.com/bethesque/pact_broker/issues/47","id":151290336,"number":47,"title":"authentication flexibility","user":{"login":"travi","id":126441,"avatar_url":"https://avatars.githubusercontent.com/u/126441?v=3","gravatar_id":"","url":"https://api.github.com/users/travi","html_url":"https://github.com/travi","followers_url":"https://api.github.com/users/travi/followers","following_url":"https://api.github.com/users/travi/following{/other_user}","gists_url":"https://api.github.com/users/travi/gists{/gist_id}","starred_url":"https://api.github.com/users/travi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travi/subscriptions","organizations_url":"https://api.github.com/users/travi/orgs","repos_url":"https://api.github.com/users/travi/repos","events_url":"https://api.github.com/users/travi/events{/privacy}","received_events_url":"https://api.github.com/users/travi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-04-27T03:21:25Z","updated_at":"2016-10-04T04:05:16Z","closed_at":null,"body":"Would it be reasonable to enable further flexibility for auth configuration? I would really like to be able enable read access in a far more public way, but still require elevated privileges to publish any changes."},"comment":{"url":"https://api.github.com/repos/bethesque/pact_broker/issues/comments/251290762","html_url":"https://github.com/bethesque/pact_broker/issues/47#issuecomment-251290762","issue_url":"https://api.github.com/repos/bethesque/pact_broker/issues/47","id":251290762,"user":{"login":"bethesque","id":446228,"avatar_url":"https://avatars.githubusercontent.com/u/446228?v=3","gravatar_id":"","url":"https://api.github.com/users/bethesque","html_url":"https://github.com/bethesque","followers_url":"https://api.github.com/users/bethesque/followers","following_url":"https://api.github.com/users/bethesque/following{/other_user}","gists_url":"https://api.github.com/users/bethesque/gists{/gist_id}","starred_url":"https://api.github.com/users/bethesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bethesque/subscriptions","organizations_url":"https://api.github.com/users/bethesque/orgs","repos_url":"https://api.github.com/users/bethesque/repos","events_url":"https://api.github.com/users/bethesque/events{/privacy}","received_events_url":"https://api.github.com/users/bethesque/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T04:05:16Z","updated_at":"2016-10-04T04:05:16Z","body":"```ruby\r\n\r\nclass BasicAuthForModifyingMethods\r\n\r\n  def initialize(app, &block)\r\n    @app = app\r\n    @app_with_basic_auth = Rack::Auth::Basic.new(app, &block)\r\n  end\r\n\r\n  def call(env)\r\n    if env[\"REQUEST_METHOD\"] == 'GET'\r\n      @app.call(env)\r\n    else\r\n      @app_with_basic_auth.call(env)\r\n    end\r\n  end\r\nend\r\n\r\n\r\napp_with_auth = BasicAuthForModifyingMethods.new(app) do |username_from_request, password_from_request|\r\n  Rack::Utils.secure_compare('username', username_from_request) &&   Rack::Utils.secure_compare('password', password_from_request)\r\nend\r\n\r\nrun app_with_auth\r\n```"}}
{"actor":{"display_login":"bethesque"}}