Trillo Workbench Guide
  • Introduction
  • Development Workflow
  • Using Trillo Workbench APIs
  • Data Service
  • Serverless Functions for Business Logic
  • Domain Metadata
  • File Management Service
  • Doc Management Service
  • Scheduling a Backend Task
  • Task History
  • Audit Logs
  • Restful Services Integration
  • OpenID Connect (OIDC) for Identity
    • Steps for Integrating Identity using OIDC
    • Google Identity Integration
    • Okta Integration
    • OneLogin Integration
  • Settings
  • User Management
  • GitHub Integration
  • Releases
Powered by GitBook
On this page
  • Registering applications with Okta
  • Writing Mapping Function

Was this helpful?

  1. OpenID Connect (OIDC) for Identity

Okta Integration

To integrate Okta Identity with Trillo Workbench, the first step involves setting up an Okta account. This process is handled conveniently on the Okta website, as described below.

PreviousGoogle Identity IntegrationNextOneLogin Integration

Last updated 1 year ago

Was this helpful?

Registering applications with Okta

Refer to the following page on the Okta website for registering a new application.

Writing Mapping Function

Okta function for mapping the user profile is shown below.

public class OktaUserProfileMapper implements Loggable, TrilloFunction {

  public Object handle(ScriptParameter scriptParameter) {

    try {
      return _handle(scriptParameter);
    } catch (Exception e) {
      log().error("Failed", e);
      return Result.getFailedResult(e.getMessage());
    }
  }

  @SuppressWarnings("unchecked")
  private Object _handle(ScriptParameter scriptParameter) {
    Map<String, Object> idpUser = (Map<String, Object>)scriptParameter.getV();
    Map<String, Object> trilloUser = mapUserProfile(idpUser);
    return trilloUser;
  }
  
  private Map<String, Object> mapUserProfile(Map<String, Object> idpUser) {
    Map<String, Object> trilloUser = new LinkedHashMap<String, Object>();
    trilloUser.put("firstName", idpUser.get("given_name"));
    trilloUser.put("lastName", idpUser.get("family_name"));
    trilloUser.put("externalId", idpUser.get("sub"));
    trilloUser.put("emailAddress", idpUser.get("email"));
    return trilloUser;
 }
}
Create an OIDC Web App in the Okta Admin Console