Sha256: ba60aae5abb92a556fe2d65cec7ce62e8e0bf4f1583157c9a973f6a86c2c0f3a

Contents?: true

Size: 569 Bytes

Versions: 9

Compression:

Stored size: 569 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 basic_authentication_method_name
      :basic_authentication
    end

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

    def current_url
      request.full_uri if request.method == :get
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
exvo-auth-0.8.2 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.8.0 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.7.16 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.7.15 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.7.14 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.7.13 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.7.12 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.7.11 lib/exvo_auth/controllers/merb.rb
exvo-auth-0.7.10 lib/exvo_auth/controllers/merb.rb