Application is not opening (loginTrusted)


I am trying to login using loginService.loginTrusted method.
So i have put the trustedClientPassword in the properties file as mentioned here:

It shows the user has logged in but it does not open the application.

To test the loginTrusted i have extended the login page and used optionGroups, if the user selects the visitor option loginTrusted should be called

My Login Trusted Code

try {
    session = loginService.loginTrusted(login,
        webAuthConfig.getTrustedClientPassword(), Locale.ENGLISH);
} catch (LoginException e) {
    throw new RuntimeException("Unable to login");

Am I doing something wrong? Is there perhaps another place i should call the loginTrusted and not in the extended login page?


You can use Connection to login externally authenticated user instead of loginTrusted:

((ExternallyAuthenticatedConnection) connection).loginAfterExternalAuthentication(userName, Locale.ENGLISH);

As an example, see There in the extended login window you will find usage example:

Usually, you have to use loginTrusted directly only if you extend DefaultConnection. It is not recommended due to complexity of the connection life cycle.

That works,
Thank You