Module: Wor::Authentication
- Defined in:
- lib/wor/authentication.rb,
lib/wor/authentication/version.rb,
lib/wor/authentication/controller.rb,
lib/wor/authentication/exceptions.rb,
lib/wor/authentication/decoded_token.rb,
lib/wor/authentication/token_manager.rb,
lib/wor/authentication/sessions_controller.rb,
lib/generators/wor/authentication/install_generator.rb
Defined Under Namespace
Modules: Controller, Exceptions, Generators, SessionsController
Classes: DecodedToken, TokenManager
Constant Summary
collapse
- VERSION =
'0.2.2'.freeze
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
33
34
35
|
# File 'lib/wor/authentication.rb', line 33
def self.config
@config
end
|
15
16
17
|
# File 'lib/wor/authentication.rb', line 15
def self.configure
yield self
end
|
.expiration_days ⇒ Object
37
38
39
|
# File 'lib/wor/authentication.rb', line 37
def self.expiration_days
@config[:expiration_days]
end
|
.expiration_days=(expiration_days) ⇒ Object
.maximum_useful_days ⇒ Object
41
42
43
|
# File 'lib/wor/authentication.rb', line 41
def self.maximum_useful_days
@config[:maximum_useful_days]
end
|
.maximum_useful_days=(maximum_useful_days) ⇒ Object
26
27
28
29
30
31
|
# File 'lib/wor/authentication.rb', line 26
def self.maximum_useful_days=(maximum_useful_days)
unless maximum_useful_days.is_a? Integer
raise Wor::Authentication::Exceptions::InvalidMaximumUsefulDaysError
end
@config[:maximum_useful_days] = maximum_useful_days
end
|