Java Auth Code Example quickstart for Generic Java (not Spring)

I m trying to implement the Okta authentication system by replacing my java web applcation’s own authentication system.

My application is a java web application contains servlets, which has its own database and client side is VBA.

Please can anyone provide a sample quickstart code for generic java application.

Sorry that the generic Java quickstart isn’t ready yet. What specifically do you need to do? Do you need your servlets to validate incoming tokens issued by Okta? Some more detail about how your client and server work would be helpful to understand your use case.

I am also interested in using a more pure java SDK over the spring boot framework.

The things I need to know are:

  1. What is the okta login url pattern used to redirect to the okta login that I need to construct from my client id, secret, etc?
  2. What is the validation process of the returned token?

I may have been able to figure some of this out but the example for spring boot seems to be missing something since I can’t actually run that example code. Fails on some sort of Logging exception. Probably need more than the okta spring boot dependency but it’s not defined so, it doesn’t work.

Any update on when this documentation will be available?

@woznicbh @SuperJonotron

Are you using any specific frameworks? Are you trying to target JAX-RS? What about containers? CDI, Guice, etc?

Or are you looking for a purel Java Servlet Filter strategy?

I am interested on this documentation.

I’m also interested in a “Spring-less” generic java quickstart application. My organization is attempting to move away from Spring-based app development

looking for the generic java quickstart as well, for legacy java app, pre-spring boot. Any examples? Or quickstart doc?

Legacy app handles oauth2 for azure and google, both have a “token url”:

google: https://accounts.google.com/o/oauth2/token
azure: https://login.microsoftonline.com/..tenant goes here…/oauth2/token

Is there anything similar for okta? I’m not finding it.

answering my own question, but the token url which I could not find is under the Authorization Server, then Settings, then clicking on metadataURI link

Hi

I am using the same Servlet based application only to which we have to integrate okta oAuth 2.0 integration. Please help !

As there is no quick start guide for the same that is the reason for me to ask this question on developer forum.

Thanks,
Abhimanu Handoo

Is there any update on this?
I need to use java without Spring to integrate OKTA, and my best idea so far is coding against the protocol. Is there a better solution?