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.43 test/dummy/app/controllers/overrides/token_validations_controller.rb
digix_devise_token_auth-0.1.44 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.43.beta1 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.42 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.41 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.40 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.39 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.38 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.37 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.37.beta4 test/dummy/app/controllers/overrides/token_validations_controller.rb
cm-devise_token_auth-0.1.30.1 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.37.beta3 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.37.beta2 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.37.beta1 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.36 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.35 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.34 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.33 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32 test/dummy/app/controllers/overrides/token_validations_controller.rb
devise_token_auth-0.1.32.beta10 test/dummy/app/controllers/overrides/token_validations_controller.rb