Hi Ray, Thanks a lot for your reply. Your response worked for me. I looked into the architecture of CAS Support Rest module and understood that you have to register your new controller in CasRestConfiguration.java as a bean and injecting all the dependencies required by the controller class.
Nishant, You will also have to add, to cas overlay, the configuration to let it know how to handle your endpoint. Look in to how cas does its REST login, https://apereo.github.io/cas/development/protocol/REST-Protocol.html. This will require digging in to the cas source,