module Authlogic::Session::HttpAuth::Config

Configuration for the HTTP basic auth feature of Authlogic.

Public Instance Methods

allow_http_basic_auth(value = nil) click to toggle source

Do you want to allow your users to log in via HTTP basic auth?

I recommend keeping this enabled. The only time I feel this should be disabled is if you are not comfortable having your users provide their raw username and password. Whatever the reason, you can disable it here.

  • Default: true

  • Accepts: Boolean

# File lib/authlogic/session/http_auth.rb, line 27
def allow_http_basic_auth(value = nil)
  rw_config(:allow_http_basic_auth, value, true)
end
Also aliased as: allow_http_basic_auth=
allow_http_basic_auth=(value = nil)
http_basic_auth_realm(value = nil) click to toggle source

HTTP authentication realm

Sets the HTTP authentication realm.

Note: This option has no effect unless #request_http_basic_auth is true

  • Default: 'Application'

  • Accepts: String

# File lib/authlogic/session/http_auth.rb, line 62
def http_basic_auth_realm(value = nil)
  rw_config(:http_basic_auth_realm, value, 'Application')
end
Also aliased as: http_basic_auth_realm=
http_basic_auth_realm=(value = nil)
request_http_basic_auth(value = nil) click to toggle source

Whether or not to request HTTP authentication

If set to true and no HTTP authentication credentials are sent with the request, the Rails controller method authenticate_or_request_with_http_basic will be used and a '401 Authorization Required' header will be sent with the response. In most cases, this will cause the classic HTTP authentication popup to appear in the users browser.

If set to false, the Rails controller method authenticate_with_http_basic is used and no 401 header is sent.

Note: This parameter has no effect unless #allow_http_basic_auth is true

  • Default: false

  • Accepts: Boolean

# File lib/authlogic/session/http_auth.rb, line 49
def request_http_basic_auth(value = nil)
  rw_config(:request_http_basic_auth, value, false)
end
Also aliased as: request_http_basic_auth=
request_http_basic_auth=(value = nil)