Skip to main content

I am using Auth0 login for users to be able to login/authenticate in Okta then redirect to the custom application and i want to know if we can pass the user token id to K2 Cloud REST API to be able to access user’s Worklist/Tasks. Initially I tried using K2 OData to get the tasks however it takes too long to load the data as it load all records first before executing the filter based on the query string. 

Account Controller:

  public async Task Login(string returnUrl = "/")
  {
      var authenticationProperties = new LoginAuthenticationPropertiesBuilder()
          .WithRedirectUri(returnUrl)
          .Build();

      await HttpContext.ChallengeAsync(Auth0Constants.AuthenticationScheme, authenticationProperties);
  }

 

Program.cs :



builder.Services.AddAuth0WebAppAuthentication(options =>
{
        options.Domain = builder.ConfigurationD"OktaAuthLocal:Domain"];
        options.ClientId = builder.Configurations"OktaAuthLocal:ClientId"];
}

 

K2 Cloud REST API that needs to be accessed:

https://.....com/api/workflow/v1/swagger/index#!/Tasks/GetTasks

 

K2 OData Query:

https://...onk2.com/api/odatav4/v4/com_K2_System_Reports_SmartObject_AnalyticsTask?$top=10&$filter=Destination eq useremail

 

Be the first to reply!

Reply