Sha256: ff65750130158395ce10932228bf8d0fbf662af95e78ec0f6bf777725f5d7412

Contents?: true

Size: 598 Bytes

Versions: 44

Compression:

Stored size: 598 Bytes

Contents

module Overrides
  class TokenValidationsController < DeviseTokenAuth::TokenValidationsController
    OVERRIDE_PROOF = '(^^,)'

    def validate_token
      # @resource will have been set by set_user_by_token concern
      if @resource
        render json: {
          success: true,
          data: @resource.as_json(except: [
            :tokens, :created_at, :updated_at
          ]),
          override_proof: OVERRIDE_PROOF
        }
      else
        render json: {
          success: false,
          errors: ["Invalid login credentials"]
        }, status: 401
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
devise_token_auth-0.1.32.beta9 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta8 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta7 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta6 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta5 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta4 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta3 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta2 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta1 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta10 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta9 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta8 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta7 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta6 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta5 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta4 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta3 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta2 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.31.beta1 test/dummy/app/controllers/overrides/token_validations_controller.rb