Class: User::Operation::RefreshToken
- Inherits:
-
Trailblazer::Operation
- Object
- Trailblazer::Operation
- User::Operation::RefreshToken
- Defined in:
- app/concepts/morpho/user/operation/refresh_token.rb
Instance Method Summary collapse
- #authentication_token(options) ⇒ Object
- #find(options) ⇒ Object
- #generate_refresh_token(options) ⇒ Object
- #not_found(options) ⇒ Object
- #not_valid(options) ⇒ Object
- #validate(options) ⇒ Object
Instance Method Details
#authentication_token(options) ⇒ Object
31 32 33 |
# File 'app/concepts/morpho/user/operation/refresh_token.rb', line 31 def authentication_token (, **) ['token'] = Morpho::JWT::Payload.new(['model']) end |
#find(options) ⇒ Object
15 16 17 |
# File 'app/concepts/morpho/user/operation/refresh_token.rb', line 15 def find (, **) ['model'] = Morpho::User.find_by(refresh_token: ['data']['refresh_token']) end |
#generate_refresh_token(options) ⇒ Object
19 20 21 |
# File 'app/concepts/morpho/user/operation/refresh_token.rb', line 19 def generate_refresh_token (, **) ['model'].generate_refresh_token! end |
#not_found(options) ⇒ Object
27 28 29 |
# File 'app/concepts/morpho/user/operation/refresh_token.rb', line 27 def not_found (, **) ['error'] = :not_found end |
#not_valid(options) ⇒ Object
23 24 25 |
# File 'app/concepts/morpho/user/operation/refresh_token.rb', line 23 def not_valid (, **) ['error'] = :not_valid end |