Class: DeviseTokenAuth::TokenValidationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/devise_token_auth/token_validations_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#resource_data, #resource_errors

Instance Method Details

#validate_tokenObject



6
7
8
9
10
11
12
13
14
# File 'app/controllers/devise_token_auth/token_validations_controller.rb', line 6

def validate_token
  # @resource will have been set by set_user_by_token concern
  if @resource
    yield @resource if block_given?
    render_validate_token_success
  else
    render_validate_token_error
  end
end