Generate a JWT Token for the Logged-In User

In order to add an authenticated interview to an Oracle Visual Builder application, you need to retrieve a JWT token from Oracle Fusion which can be used in REST web services to authenticate the logged-in user. A JWT token can be generated by adding a custom attribute to an existing object (for example, to the Queue object) in Oracle Fusion. To do this:

  1. Sign in to Oracle Fusion as an administrator.

  2. Create and activate a sandbox. For more information, see Overview of Sandboxes.

  3. Navigate to Application Composer. For more information, see Overview of Using Application Composer.

  4. In the Objects navigation tree, select Standard Objects then the object, then Fields.

  5. On the Fields page on the Custom tab, in the Action menu, select Create.

  6. In the Select Field Type window, select Formula, then click OK.

  7. On the Create Formula Field: Describe Field page in the Display Label text box, enter JWT Token, then click Next.

  8. On the Create Formula Field: Configure Expression page in the Edit Script text box, type in the following code:
    return new oracle.apps.fnd.applcore.common.SecuredTokenBean().getTrustToken()

  9. Click Submit.

    The Application Composer in Oracle Fusion showing a custom field added for a JWT Token