Module: Vertebrae::Authorization
- Included in:
- Configuration, Connection
- Defined in:
- lib/vertebrae/authorization.rb
Instance Method Summary collapse
-
#authenticated? ⇒ Boolean
Check whether authentication credentials are present.
- #authentication ⇒ Object
- #basic_auth ⇒ Object
- #password? ⇒ Boolean
- #username? ⇒ Boolean
Instance Method Details
#authenticated? ⇒ Boolean
Check whether authentication credentials are present
14 15 16 |
# File 'lib/vertebrae/authorization.rb', line 14 def authenticated? (username? && password?) end |
#authentication ⇒ Object
22 23 24 |
# File 'lib/vertebrae/authorization.rb', line 22 def authentication { :basic_auth => basic_auth } end |
#basic_auth ⇒ Object
18 19 20 |
# File 'lib/vertebrae/authorization.rb', line 18 def basic_auth "#{username}:#{password}" end |
#password? ⇒ Boolean
9 10 11 |
# File 'lib/vertebrae/authorization.rb', line 9 def password? password.present? end |
#username? ⇒ Boolean
5 6 7 |
# File 'lib/vertebrae/authorization.rb', line 5 def username? username.present? end |