Sha256: cbe63d8b76c8444f72844efb7e1cd659ffbe63316150cd80d492d546b9a15e35

Contents?: true

Size: 382 Bytes

Versions: 2

Compression:

Stored size: 382 Bytes

Contents

module Octokit
  class Client
    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
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
octokit-0.4.1 lib/octokit/client/authentication.rb
octokit-0.4.0 lib/octokit/client/authentication.rb