Class: Boar::Handlers::Authentication
- Inherits:
-
Generic
- Object
- Generic
- Boar::Handlers::Authentication
show all
- Defined in:
- app/models/boar/handlers/authentication.rb
Instance Attribute Summary
Attributes inherited from Generic
#configuration, #service
Instance Method Summary
collapse
Methods inherited from Generic
#initialize
#ensure_hash, #get_option, #interpolate
Instance Method Details
#authenticate_for(_ = nil) ⇒ Object
32
33
34
35
|
# File 'app/models/boar/handlers/authentication.rb', line 32
def authenticate_for(_ = nil)
true
end
|
#authenticating_for?(_ = nil) ⇒ Boolean
23
24
25
|
# File 'app/models/boar/handlers/authentication.rb', line 23
def authenticating_for?(_ = nil)
false end
|
#call(*args) ⇒ Object
10
11
12
13
14
15
16
17
|
# File 'app/models/boar/handlers/authentication.rb', line 10
def call(*args)
path = args[0]
if self.required_for?(path) then
self.authenticating_for?(path) ? self.authenticate_for(path) : self.request_authentication_for(path)
end
end
|
#request_authentication_for(_ = nil) ⇒ Object
27
28
29
30
|
# File 'app/models/boar/handlers/authentication.rb', line 27
def request_authentication_for(_ = nil)
@service.controller.render(@service.handler_for(:views).call(:authentication))
end
|
#required_for?(_ = nil) ⇒ Boolean
19
20
21
|
# File 'app/models/boar/handlers/authentication.rb', line 19
def required_for?(_ = nil)
false end
|