Sha256: 157910d989fd263f4feae0a7aa7c6cb78bfb765a83ec5df184e094bf53898fa5

Contents?: true

Size: 697 Bytes

Versions: 1

Compression:

Stored size: 697 Bytes

Contents

module Passport
  module State
    def self.included(base)
      base.extend ClassMethods
    end
    
    module ClassMethods
      def key?(key)
        Rack::Context.key?(key)
      end
      
      def session_key?(key)
        Rack::Context.session_key?(key)
      end
      
      def params_key?(key)
        Rack::Context.params_key?(key)
      end
      
      def params?
        !params.blank?
      end
      
      def session?
        !session.blank?
      end
      
      def active?
        Passport::Oauth::Protocol.active? || Passport::Oauth::Protocol.active?
      end
      
      def authenticating?(type)
        authentication_type == type.to_s
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
passport-0.1.1 lib/passport/core/state.rb