Module: BitBucket::Authorization
- Included in:
- API
- Defined in:
- lib/bitbucket_rest_api/authorization.rb
Instance Method Summary collapse
-
#authenticated? ⇒ Boolean
Check whether authentication credentials are present.
-
#authentication ⇒ Object
Select authentication parameters.
-
#basic_authed? ⇒ Boolean
Check whether basic authentication credentials are present.
Instance Method Details
#authenticated? ⇒ Boolean
Check whether authentication credentials are present
7 8 9 |
# File 'lib/bitbucket_rest_api/authorization.rb', line 7 def authenticated? basic_authed? || oauth_token? end |
#authentication ⇒ Object
Select authentication parameters
17 18 19 20 21 22 23 24 25 |
# File 'lib/bitbucket_rest_api/authorization.rb', line 17 def authentication if basic_auth? { :basic_auth => basic_auth } elsif login? && password? { :login => login, :password => password } else { } end end |
#basic_authed? ⇒ Boolean
Check whether basic authentication credentials are present
12 13 14 |
# File 'lib/bitbucket_rest_api/authorization.rb', line 12 def basic_authed? basic_auth? || (login? && password?) end |