I’m trying to create Identity provider programmatically with the Okta SDK Java 15.0.0(the latest version) using a OIDC Service application.
I found few examples for older versions, however most of the classes are not present in the latest release.
Currently, my understanding is that an ApiClient has to be constructed, using the necessary details. After that, an IdentityProviderBuilder has to be created and initialized so that the IdP can be created.
My question is whether there’s a mechanism in the latest version of the SDK that can create an IdP and if so, I would really appreciate a simple example.
I actually found the IdentityProvider class. I used it to construct the properties of the identity provider.
For the API connection I used Clients.builder() for an ApiClient object, which I passed to the constructor of IdentityProviderApi. Then, the object of IdentityProviderApi has the method createIdentityProvider(idp), which basically uses the invokeAPI method under the hood.