Sha256: 5ec56d8e1e8185fef166c744cac3660009b28d41db1a079cd490968945cf4b2b

Contents?: true

Size: 446 Bytes

Versions: 7

Compression:

Stored size: 446 Bytes

Contents

class Maestrano::Rails::WebHookController < ApplicationController
  before_filter :authenticate_maestrano!
  
  private
    def authenticate_maestrano!
      authorized = false
      authenticate_with_http_basic do |app_id, api_token|
        authorized = Maestrano.authenticate(app_id,api_token)
      end
      unless authorized
        render json: {error: 'Invalid credentials' }, status: :unauthorized
      end
      return true
    end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
maestrano-rails-0.9.2 app/controllers/maestrano/rails/web_hook_controller.rb
maestrano-rails-0.9.1 app/controllers/maestrano/rails/web_hook_controller.rb
maestrano-rails-0.9.0 app/controllers/maestrano/rails/web_hook_controller.rb
maestrano-rails-0.8.0 app/controllers/maestrano/rails/web_hook_controller.rb
maestrano-rails-0.7.0 app/controllers/maestrano/rails/web_hook_controller.rb
maestrano-rails-0.6.0 app/controllers/maestrano/rails/web_hook_controller.rb
maestrano-rails-0.5.0 app/controllers/maestrano/rails/web_hook_controller.rb