Sha256: 1190d8506e4635498fcc4e9f04bed95b4eabb601ab2f8cd0272d549fcbc33cd4

Contents?: true

Size: 663 Bytes

Versions: 4

Compression:

Stored size: 663 Bytes

Contents

module Orkut
  module Authenticatable

    # Credentials hash
    #
    # @return [Hash]
    def credentials_v1
      {
        :consumer_key => consumer_key,
        :consumer_secret => consumer_secret,
        :token => oauth_token,
        :token_secret => oauth_token_secret
      }
    end

    def credentials
      {
        :refresh_token => refresh_token,
        :access_token => access_token,
        :expires_in => expires_in,
        :issued_at => issued_at
      }
    end

    # Check whether user is authenticated
    #
    # @return [Boolean]
    def authenticated?
      credentials.values.all? and credentials_v1.values.all?
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
orkut-0.0.0.12 lib/orkut/authenticatable.rb
orkut-0.0.0.11 lib/orkut/authenticatable.rb
orkut-0.0.0.10 lib/orkut/authenticatable.rb
orkut-0.0.0.9 lib/orkut/authenticatable.rb