Please move the common code for handling token into a static helper method of a separate static class which can be accessed by all the controllers.