Skip to content

Commit

Permalink
Merge pull request #6 from luzho/master
Browse files Browse the repository at this point in the history
Adding missed methods in token_validations_controller.rb
  • Loading branch information
femirsa authored May 30, 2017
2 parents c473b54 + 00f5bc7 commit 49f4dc8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/controllers/devise_token_auth/token_validations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,20 @@ def validate_external_token
end
end

protected

def render_validate_token_success
render json: {
success: true,
data: resource_data(resource_json: @resource.token_validation_response)
}
end

def render_validate_token_error
render json: {
success: false,
errors: [I18n.t("devise_token_auth.token_validations.invalid")]
}, status: 401
end
end
end

0 comments on commit 49f4dc8

Please sign in to comment.