function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How can I create a custom controller for login page



  I have crated a custom login page in visual force with username and password fields and I want to write a custom controller where in I can call core method binding.login(username, password); in that. How can i do that?


It sounds like you want to login as a different user through the API (binding.login) vs who is logged in to the application. Is that correct?


In order to use the standard web services API within Apex, you will need to construct the Apex classes using the HTTP, HTTPRequest, and HTTPResponse classes. I have tried in the past to use WSDL2Apex to import the WSDL but ran into issues.