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



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

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