Sha256: 0e3161a29e4c4f201cd3e1a3723ff943395a3299a5b560e8516fbbb530eb8c1c

Contents?: true

Size: 315 Bytes

Versions: 7

Compression:

Stored size: 315 Bytes

Contents

module Vertebrae
  module Authorization

    # Check whether authentication credentials are present
    def authenticated?
      (username? && password?)
    end

    def basic_auth
      "#{username}:#{password}"
    end

    def authentication
      { :basic_auth => basic_auth }
    end
  end # Authorization
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vertebrae-0.1.6 lib/authorization.rb
vertebrae-0.1.5 lib/authorization.rb
vertebrae-0.1.4 lib/authorization.rb
vertebrae-0.1.3 lib/authorization.rb
vertebrae-0.1.2 lib/authorization.rb
vertebrae-0.1.1 lib/authorization.rb
vertebrae-0.1.0 lib/authorization.rb