Sha256: 73b7fa7d55e59db28cac5ea955dac4968db4af2f606ae3813159631e8861fd76

Contents?: true

Size: 505 Bytes

Versions: 9

Compression:

Stored size: 505 Bytes

Contents

module Octokit
  module Authentication
    def authentication
      if login && password
        {:login => login, :password => password}
      else
        {}
      end
    end

    def authenticated?
      !authentication.empty?
    end

    def oauthed?
      !oauth_token.nil?
    end

    def unauthed_rate_limited?
      client_id && client_secret
    end

    def unauthed_rate_limit_params
      {
        :client_id => client_id,
        :client_secret => client_secret
      }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
octokit-1.19.0 lib/octokit/authentication.rb
octokit-1.18.0 lib/octokit/authentication.rb
octokit-1.17.1 lib/octokit/authentication.rb
octokit-1.17.0 lib/octokit/authentication.rb
octokit-1.15.1 lib/octokit/authentication.rb
octokit-1.15.0 lib/octokit/authentication.rb
octokit-1.14.0 lib/octokit/authentication.rb
octokit-1.13.0 lib/octokit/authentication.rb
octokit-1.12.0 lib/octokit/authentication.rb