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
5 6 7 |
# File 'lib/bitbucket_rest_api/authorization.rb', line 5 def authenticated? basic_authed? || oauth_token? end |
#authentication ⇒ Object
Select authentication parameters
15 16 17 18 19 20 21 22 23 |
# File 'lib/bitbucket_rest_api/authorization.rb', line 15 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
10 11 12 |
# File 'lib/bitbucket_rest_api/authorization.rb', line 10 def basic_authed? basic_auth? || (login? && password?) end |