okta-sdk-java icon indicating copy to clipboard operation
okta-sdk-java copied to clipboard

Unable to specify FEDERATION AuthenticationProvider

Open ksj-trackunit opened this issue 1 year ago • 1 comments

Describe the bug?

Prior to version 18.0.0 is was possible to create a federated user like so

CreateUserRequest request = new CreateUserRequest()
        .credentials(new UserCredentials()
                .provider(new AuthenticationProvider()
                        .name("FEDERATION")
                        .type(FEDERATION)));

userApi.createUser(request, true, true, null, Map.of());

After upgrading to the latest version the .name() field is made private and it is no longer possible to set it. When omitting the field the provider will be OKTA even though the type is FEDERATION.

What is expected to happen?

Expected user to have FEDERATION as the provider instead of OKTA when AuthenticationProvider has type FEDERATION.

What is the actual behavior?

Specifying the type as FEDERATION will not affect the authentication provider. It will still be OKTA.

Reproduction Steps?

Create a user via SDK using the snippet provided in the bug report using SDK version 18+.

Additional Information?

No response

Java Version

openjdk 21 2023-09-19 OpenJDK Runtime Environment (build 21+35-2513) OpenJDK 64-Bit Server VM (build 21+35-2513, mixed mode, sharing)

SDK Version

18.0.0 and 19.0.0

OS version

No response

ksj-trackunit avatar Sep 26 '24 10:09 ksj-trackunit

@ksj-trackunit Thanks for posting!

This looks like a bug introduced with our recent Open API Spec update. I'll get the spec fixed and SDK released soon.

arvindkrishnakumar-okta avatar Sep 26 '24 12:09 arvindkrishnakumar-okta

This is resolved as of 19.0.0 right?

royathan avatar Oct 01 '24 04:10 royathan

This bug was filed against 19.0.0

arvindkrishnakumar-okta avatar Oct 01 '24 13:10 arvindkrishnakumar-okta

Ah.. Turns out we were never passing that correctly :)

royathan avatar Oct 01 '24 15:10 royathan