Class: IronBank::Authentication
- Inherits:
-
Object
- Object
- IronBank::Authentication
- Extended by:
- Forwardable
- Defined in:
- lib/iron_bank/authentication.rb
Overview
Get a valid token or session HTTP request header for IronBank
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
- #create_session ⇒ Object (also: #renew_session)
-
#initialize(params) ⇒ Authentication
constructor
A new instance of Authentication.
Constructor Details
#initialize(params) ⇒ Authentication
Returns a new instance of Authentication.
13 14 15 16 17 |
# File 'lib/iron_bank/authentication.rb', line 13 def initialize(params) @auth_type = params.delete(:auth_type) @params = params create_session end |
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
9 10 11 |
# File 'lib/iron_bank/authentication.rb', line 9 def session @session end |
Instance Method Details
#create_session ⇒ Object Also known as: renew_session
19 20 21 |
# File 'lib/iron_bank/authentication.rb', line 19 def create_session @session = adapter.new(**params) end |