Class: ActionController::Base

Inherits:
Object
  • Object
show all
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

Methods included from Authpwn::ControllerBaseExtensions

#auth_controller?

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(options = {})
  include Authpwn::HttpBasicControllerInstanceMethods
  before_action :authenticate_using_http_basic, options
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(options = {})
  include Authpwn::HttpTokenControllerInstanceMethods
  before_action :authenticate_using_http_token, options
end