Sha256: dc6f6404dae528924f54bc0171e9103b1bd4e5e4b043b6b8fa33bb9b3d8b51a3

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

module Octokit
  module Authentication
    def authentication
      if login && token
        {:login => "#{login}/token", :password => token}
      elsif login && password
        {:login => login, :password => password}
      else
        {}
      end
    end

    def authenticated?
      !authentication.empty?
    end

    def oauthed?
      !oauth_token.nil?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octokit-0.6.4 lib/octokit/authentication.rb