class IronBank::Authentication
Get a valid token or session HTTP request header for IronBank
Attributes
auth_type[R]
params[R]
session[R]
Public Class Methods
new(params)
click to toggle source
# File lib/iron_bank/authentication.rb, line 13 def initialize(params) @auth_type = params.delete(:auth_type) @params = params create_session end
Public Instance Methods
create_session()
click to toggle source
# File lib/iron_bank/authentication.rb, line 19 def create_session @session = adapter.new(**params) end
Also aliased as: renew_session
Private Instance Methods
adapter()
click to toggle source
# File lib/iron_bank/authentication.rb, line 28 def adapter @adapter ||= if auth_type == "cookie" IronBank::Authentications::Cookie else IronBank::Authentications::Token end end