Sha256: f3af34de54ef4fa029e68714cd08df683859f6a0927379a94f28e78cc28dd354

Contents?: true

Size: 461 Bytes

Versions: 14

Compression:

Stored size: 461 Bytes

Contents

module SwitchUser
  module Provider
    class Authlogic < Base
      def initialize(controller)
        @controller = controller
      end

      def login(user, scope = nil)
        UserSession.create(user)
      end

      def logout(scope = nil)
        @controller.current_user_session.destroy
      end

      def current_user(scope = nil)
        result = UserSession.find
        if result
          result.record
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
switch_user-1.5.0 lib/switch_user/provider/authlogic.rb
switch_user-1.4.0 lib/switch_user/provider/authlogic.rb
switch_user-1.3.1 lib/switch_user/provider/authlogic.rb
switch_user-1.3.0 lib/switch_user/provider/authlogic.rb
switch_user-1.2.1 lib/switch_user/provider/authlogic.rb
switch_user-1.2.0 lib/switch_user/provider/authlogic.rb
switch_user-1.1.0 lib/switch_user/provider/authlogic.rb
switch_user-1.0.2 lib/switch_user/provider/authlogic.rb
switch_user-1.0.1 lib/switch_user/provider/authlogic.rb
switch_user-1.0.0 lib/switch_user/provider/authlogic.rb
switch_user-0.9.5 lib/switch_user/provider/authlogic.rb
switch_user-0.9.4 lib/switch_user/provider/authlogic.rb
switch_user-0.9.3 lib/switch_user/provider/authlogic.rb
switch_user-0.9.2 lib/switch_user/provider/authlogic.rb