Using okta api from java spring app

Hi,
I am writing proxy for okta api.
I am using okta-spring-boot-starter dependency, and I realize that I can not use this code from your docs because I have not Client class to import.

Client client = Clients.builder()
.setOrgUrl(“https://{yourOktaDomain}”) // e.g. https://dev-123456.okta.com
.setClientCredentials(new TokenClientCredentials("{apiToken}"))
.build();

Should I directly import okta-sdk-httpclient dependency or how I work with okta-spring-boot-starter?
Thank you for answer.

With Spring you can use a single dependency:

<dependency>
    <groupId>com.okta.spring</groupId>
    <artifactId>okta-spring-sdk</artifactId>
    <version>${okta.version}</version>
</dependency>

You must have the following properties defined:

  • okta.client.token
  • okta.client.orgUrl

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.