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:
-
Sign in to Oracle Fusion as an administrator.
-
Create and activate a sandbox. For more information, see Overview of Sandboxes.
-
Navigate to Application Composer. For more information, see Overview of Using Application Composer.
-
In the Objects navigation tree, select Standard Objects then the object, then Fields.
-
On the Fields page on the Custom tab, in the Action menu, select Create.
-
In the Select Field Type window, select Formula, then click OK.
-
On the Create Formula Field: Describe Field page in the Display Label text box, enter JWT Token, then click Next.
-
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() -
Click Submit.
