Module: Octokit::Authentication

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

Instance Method Summary collapse

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/octokit/authentication.rb', line 11

def authenticated?
  !authentication.empty?
end

#authenticationObject



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

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

#oauthed?Boolean

Returns:

  • (Boolean)


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

def oauthed?
  !oauth_token.nil?
end

#unauthed_rate_limit_paramsObject



23
24
25
26
27
28
# File 'lib/octokit/authentication.rb', line 23

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

#unauthed_rate_limited?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/octokit/authentication.rb', line 19

def unauthed_rate_limited?
  client_id && client_secret
end