User Authentication in Java SDK

Hi.

I’m using the Java SDK and I would like to enable user login. Is there a method for that? I did not see any user authentication in the Client interface. Am I missing something?

Thanks,

Amir

Hey @amir!

Just creating the user or the actual authentication of the user?

For user creation (with a password):

(For actual auth, you have a few options, but let me know if that is what you are looking for)

Hi @bdemers!

I want to authenticate an existing user with username and password.

We recommend using OIDC/OAuth 2.0 when possible as this avoids your application needing to handle sensitive credentials.

If you are using Spring, this is the easiest option: https://github.com/okta/okta-spring-boot (you could use Spring Security as well)

For Android take a look at these samples: https://github.com/okta/samples-android

Lastly, if you need to deal with credentials directly (and understand the associated risks) you could use: https://github.com/okta/okta-auth-java

Thanks!

I wasn’t aware of the okta-auth-java library.