Module: HttpBaseAuth

Included in:
ActionController::Base
Defined in:
lib/http_base_auth.rb,
lib/http_base_auth/version.rb

Constant Summary collapse

VERSION =
"0.0.2.5"

Instance Method Summary collapse

Instance Method Details

#authenticationObject



17
18
19
# File 'lib/http_base_auth.rb', line 17

def authentication
  @authentication ||= CookiesAuthentication.new(Rails.application.config.auth, cookies)
end

#process_authenticationObject



7
8
9
10
11
12
13
14
15
# File 'lib/http_base_auth.rb', line 7

def process_authentication
  if authentication.required?
    authenticate_or_request_with_http_basic do |username, password|
      authentication.validate(username, password)
    end
  else
    true
  end
end

#reset_authenticationObject



3
4
5
# File 'lib/http_base_auth.rb', line 3

def reset_authentication
  authentication.reset
end