IBM Worklight v5.0.5 > Develop IBM Worklight applications > Authentication configuration

Adapter authenticator

Use the adapter authenticator to develop custom authentication logic in JavaScript within an adapter. This technique is mostly useful for multi-step login processes that cannot be implemented by merely configuring the authenticators defined in the previous sections.

This authenticator can be used with any login module.


Class Name


Parameters

Parameter Description
<login-function> The name of the JavaScript function, in the format...

    <adapter-name.function-name>

...invoked when the login is triggered:

  • When client app explicitly invokes WL.Client.login
  • When client app trys to accesse a protected procedure

Request headers are sent as an input parameter, including the user agent and other information. This function should not be exposed as a procedure by the adapter.

<logout-function> Optional. The name of the JavaScript function, in the format...

    <adapter-name.function-name>

...invoked when the session is terminated:

  • When client app invokess WL.Client.logout
  • When server terminates the session

This function receives no parameters. This function should not be exposed as a procedure by the adapter.


Example

<realm name="ACMERealm" loginModule="ACMELoginModule">
    <className> com.worklight.integration.auth.AdapterAuthenticator </className>
    <parameter name="login-function" value="ACMEAuthAdapter.triggerLogin" />
    <parameter name="logout-function" value="ACMEAuthAdapter.logout" />
</realm>


Parent Authentication configuration





+

Search Tips   |   Advanced Search