The built-in controllers can be overridden with your own custom controllers.
For example, the default behavior of the validate_token method of the TokenValidationController is to return the User object as json (sans password and token data). The following example shows how to override the validate_token action to include a model method as well.
Note: Controller overrides must implement the expected actions of the controllers that they replace.
Passing blocks to Controllers
It may be that you simply want to add behavior to existing controllers without having to re-implement their behavior completely. In this case, you can do so by creating a new controller that inherits from any of DeviseTokenAuth's controllers, overriding whichever methods you'd like to add behavior to by passing a block to super: