Setting Up Dynamic Authentication

Use dynamic authentication to enable the user to set the name and password on the client.

You can create the Credential Request starting point with a Credential screen automatically when you initially create a new Hybrid App, or you can create the Credential Request starting point and associated screen manually. This procedure shows how to create the Credential Request starting point automatically when you create a new Hybrid App.
  1. In the Mobile Development perspective, select File > New > Hybrid App Designer.
  2. Follow the instructions in the Hybrid App Designer wizard:
    • Enter or select the parent folder – select the Hybrid App project in which to create the Hybrid App screen flow.
    • File name – enter a name for the Hybrid App screen flow. The extension for Hybrid App screen flows is .xbw.
    • Advanced – link the Hybrid App screen flow to an existing file in the file system.
    • Link to file in the file system – click Browse to locate the file to which to link the Hybrid App screen flow. Linked resources are files or folders that are stored in the file system outside of the project's location. If you link a resource to an editor, when you select the editor, the resource is selected in the WorkSpace Navigator. Conversely, when you select the resource in the WorkSpace Navigator, the editor is selected.

      Click Variables to define a new path variable. Path variables specify locations on the file system.

  3. In the Starting Points page, select Credentials (authentication) may be requested dynamically from the client application.
  4. Follow the steps to create the type of Hybrid App you want. Click Finish.
  5. In the Hybrid App Designer, open the Flow Design to see the Credential Request starting point and its associated Credential Request screen.
    To see the two pre-defined keys, cc_username and cc_password in the Properties view, click the Credential Request starting point.
  6. Double-click the Credential Request screen to open the Screen Design page.
    The two editbox controls on the screen are bound to the pre-defined keys, cc_username and cc_password.
  7. Select Username. In the Properties view, open the Advanced page.
    On the Username editbox, Credential cache username is selected by default. Click the Password editbox; the associated Credential cache password checkbox is selected.
    Note: If you create a Credential Request starting point and screen manually, you must add the editbox controls, create the keys for the username and password, and check the corresponding Credential cache username or password box.
  8. (Optional) To use certificate-based authentication instead of the user name and password:
    1. Add a MenuItem to the Menu box.
    2. Select the MenuItem to see its Properties.
    3. In the Properties view, from Type, choose Select Certificate.
      When the user selects the menu item on the device, a dialog opens to select a certificate for credentials.
  9. Select File > Save.
    The first time the Hybrid App is started following deployment, the credential screen opens. The username and password values are cached in the credential cache.
    Note: If an e-mail-triggered screen flow has dynamic cached credentials, the cached credentials are not cached between invocations of the screen flow through an e-mail trigger.