Module: Octokit::Authentication
- Included in:
- Client
- Defined in:
- lib/octokit/authentication.rb
Overview
Authentication methods for Client
Instance Method Summary collapse
-
#application_authenticated? ⇒ Boolean
Indicates if the client has OAuth Application client_id and secret credentials to make anonymous requests at a higher rate limit.
-
#basic_authenticated? ⇒ Boolean
Indicates if the client was supplied Basic Auth username and password.
-
#token_authenticated? ⇒ Boolean
Indicates if the client was supplied an OAuth access token.
-
#user_authenticated? ⇒ Boolean
Indicates if the client was supplied an OAuth access token or Basic Auth username and password.
Instance Method Details
#application_authenticated? ⇒ Boolean
Indicates if the client has OAuth Application client_id and secret credentials to make anonymous requests at a higher rate limit
39 40 41 |
# File 'lib/octokit/authentication.rb', line 39 def application_authenticated? !!application_authentication end |
#basic_authenticated? ⇒ Boolean
Indicates if the client was supplied Basic Auth username and password
11 12 13 |
# File 'lib/octokit/authentication.rb', line 11 def basic_authenticated? @login && @password end |
#token_authenticated? ⇒ Boolean
Indicates if the client was supplied an OAuth access token
20 21 22 |
# File 'lib/octokit/authentication.rb', line 20 def token_authenticated? !!@access_token end |
#user_authenticated? ⇒ Boolean
Indicates if the client was supplied an OAuth access token or Basic Auth username and password
29 30 31 |
# File 'lib/octokit/authentication.rb', line 29 def user_authenticated? basic_authenticated? || token_authenticated? end |