Module: Octokit::Authentication

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

Instance Method Summary collapse

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)


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

def authenticated?
  !authentication.empty?
end

#authenticationObject



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

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

#oauthed?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/octokit/authentication.rb', line 17

def oauthed?
  !oauth_token.nil?
end