Module: Authlogic::Session::Params::Config
- Defined in:
- lib/authlogic/session/params.rb
Overview
Configuration for the params / single access feature.
Instance Method Summary (collapse)
-
- (Object) params_key(value = nil)
(also: #params_key=)
Works exactly like cookie_key, but for params.
-
- (Object) single_access_allowed_request_types(value = nil)
(also: #single_access_allowed_request_types=)
Authentication is allowed via a single access token, but maybe this is something you don’t want for your application as a whole.
Instance Method Details
- (Object) params_key(value = nil) Also known as: params_key=
Works exactly like cookie_key, but for params. So a user can login via params just like a cookie or a session. Your URL would look like:
http://www.domain.com?user_credentials=my_single_access_key
You can change the “user_credentials” key above with this configuration option. Keep in mind, just like cookie_key, if you supply an id the id will be appended to the front. Check out cookie_key for more details. Also checkout the “Single Access / Private Feeds Access” section in the README.
Default: cookie_key
Accepts: String
45 46 47 |
# File 'lib/authlogic/session/params.rb', line 45 def params_key(value = nil) rw_config(:params_key, value, ) end |
- (Object) single_access_allowed_request_types(value = nil) Also known as: single_access_allowed_request_types=
Authentication is allowed via a single access token, but maybe this is something you don’t want for your application as a whole. Maybe this is something you only want for specific request types. Specify a list of allowed request types and single access authentication will only be allowed for the ones you specify.
Default: [“application/rss+xml”, “application/atom+xml”]
Accepts: String of a request type, or :all or :any to allow single access authentication for any and all request types
56 57 58 |
# File 'lib/authlogic/session/params.rb', line 56 def single_access_allowed_request_types(value = nil) rw_config(:single_access_allowed_request_types, value, ["application/rss+xml", "application/atom+xml"]) end |