Module: Octokit::Client::Authentication

Included in:
Octokit::Client
Defined in:
lib/octokit/client/authentication.rb

Instance Method Summary collapse

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/octokit/client/authentication.rb', line 14

def authenticated?
  !authentication.empty?
end

#authenticationObject



4
5
6
7
8
9
10
11
12
# File 'lib/octokit/client/authentication.rb', line 4

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