I am using Spring Boot to connect to Okta Server.
I am using below OKTA SDK API to store create user.
User user = client.createuser(CreateUserRequest request);
My problem is I am not able to create instance for CreateUserRequest as it is an interface and the implementation class not available in that dependency.
I am posting here this question to know that, is there any sample reference available for building the CreateUserRequest object.
UserApi userApi = new UserApi(client);
User user = UserBuilder.instance()
.setEmail(βjoe.coder@example.comβ)
.setFirstName(βJoeβ)
.setLastName(βCodeβ)
.buildAndCreate(userApi);
Code snippet you shared was really helpful.I have already implemented this. But I am stuck with one issue.
When I try to call createUser method, the method is expecting createrequest object as a parameter. This is an interface. I tried to create implementation and tried to set the data, but it is not allowing me to do that.