Class: ActionController::Base
- Inherits:
-
Object
- Object
- ActionController::Base
- Includes:
- Authpwn::ControllerBaseExtensions
- Defined in:
- lib/authpwn_rails/http_token.rb,
lib/authpwn_rails/http_basic.rb,
lib/authpwn_rails/session.rb
Overview
namespace Authpwn
Class Method Summary collapse
-
.authenticates_using_http_basic(options = {}) ⇒ Object
Keeps track of the currently authenticated user via the session.
-
.authenticates_using_http_token(options = {}) ⇒ Object
Keeps track of the currently authenticated user via the session.
Methods included from Authpwn::ControllerBaseExtensions
Class Method Details
.authenticates_using_http_basic(options = {}) ⇒ Object
Keeps track of the currently authenticated user via the session.
Assumes the existence of a User model. A bare ActiveModel model will do the trick. Model instances must implement id, and the model class must implement find_by_id.
10 11 12 13 |
# File 'lib/authpwn_rails/http_basic.rb', line 10 def self.authenticates_using_http_basic( = {}) include Authpwn::HttpBasicControllerInstanceMethods before_action :authenticate_using_http_basic, end |
.authenticates_using_http_token(options = {}) ⇒ Object
Keeps track of the currently authenticated user via the session.
Assumes the existence of a User model. A bare ActiveModel model will do the trick. Model instances must implement id, and the model class must implement find_by_id.
10 11 12 13 |
# File 'lib/authpwn_rails/http_token.rb', line 10 def self.authenticates_using_http_token( = {}) include Authpwn::HttpTokenControllerInstanceMethods before_action :authenticate_using_http_token, end |