module Vertebrae::Authorization

Public Instance Methods

authenticated?() click to toggle source

Check whether authentication credentials are present

# File lib/vertebrae/authorization.rb, line 14
def authenticated?
  (username? && password?)
end
authentication() click to toggle source
# File lib/vertebrae/authorization.rb, line 22
def authentication
  { :basic_auth => basic_auth }
end
basic_auth() click to toggle source
# File lib/vertebrae/authorization.rb, line 18
def basic_auth
  "#{username}:#{password}"
end
password?() click to toggle source
# File lib/vertebrae/authorization.rb, line 9
def password?
  password.present?
end
username?() click to toggle source
# File lib/vertebrae/authorization.rb, line 5
def username?
  username.present?
end