Develop > Presentation layer > Customize IBM Sales Center > Sales Center Auto-logon
Add support for auto-logon
To support the autologon feature, declare the web application using the com.ibm.eswe.workbench.WctWebApplication extension point and ensure that the URL provider provides auto logon support. The AutoLogonUrlProvider class is provided as a convenient super class for a URL provider that supports auto-logon.
If you are subclassing AutoLogonUrlProvider then we will need to provide an implementation for the constructAutoLogonUrl method to provide a URL that will handle logon. If the application is authenticating with the WebSphere Commerce Server, then this method must obtain the single sign-on token from the server and add it to the URL as a URL parameter with the parameter name SSOToken.
To obtain the single sign-on token you can use the get SSO Token service request. The following sample code will invoke the service request to retrieve the single sign-on token from the WebSphere Commerce Server:
String token = null; try { //Try to get the SSO token TelesalesJobScheduler scheduler = TelesalesJobScheduler.getInstance(); TelesalesRequestStatus status = scheduler.run("com.ibm.commerce.telesales.GetSSOTokenRequest", null, true); TelesalesJobScheduler.handleErrors(status); token = (String) status.getData(); } catch(Exception e) { UIImplPlugin.log(e); }
Related concepts
Browser integration techniques
Auto-logon to WebSphere Commerce tools from the Sales Center
Related tasks