Sha256: 0ca8bd3be2151e05cd96b0eb4af00df0ac57cab0a1a66398d22f1942390ad1ad

Contents?: true

Size: 556 Bytes

Versions: 15

Compression:

Stored size: 556 Bytes

Contents

module ExvoAuth::Controllers::Merb
  def self.included(base)
    base.send :include, ExvoAuth::Controllers::Base
    base.send :include, InstanceMethods
  end
  
  module InstanceMethods
    def authenticate_user!
      super
      throw :halt unless signed_in?
    end
    
    protected

    def request_method
      request.method.to_s.upcase
    end

    def basic_authentication_method_name
      :basic_authentication
    end

    def redirect_to(*args)
      redirect(*args)
    end
    
    def find_user_by_id(id)
      User[id]
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
exvo-auth-0.10.4 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.10.3 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.10.2 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.10.1 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.10.0 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.10 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.9 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.8 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.7 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.6 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.5 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.4 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.3 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.2 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.9.0 lib/exvo_auth/controllers/merb.rb