Class: Monban::Services::Authentication
- Inherits:
-
Object
- Object
- Monban::Services::Authentication
- Defined in:
- lib/monban/services/authentication.rb
Overview
Authentication service. Checks to see if the credentials provided are valid
Instance Method Summary collapse
-
#initialize(user, undigested_token) ⇒ Authentication
constructor
Initialize service.
-
#perform ⇒ User, false
Perform the service.
Constructor Details
#initialize(user, undigested_token) ⇒ Authentication
Initialize service
10 11 12 13 |
# File 'lib/monban/services/authentication.rb', line 10 def initialize user, undigested_token @user = user @undigested_token = undigested_token end |
Instance Method Details
#perform ⇒ User, false
Perform the service
19 20 21 22 23 24 25 |
# File 'lib/monban/services/authentication.rb', line 19 def perform if authenticated? user else false end end |