How to authenticate a Rest api using Okta user credentials

Hi
I need to Integrate my Rest API with Okta, where my rest api accepts a basic authentication which should be Okta credentials. Please let me know any reference for this in Java.

See our Create a Secure Spring REST API blog post for an example. As far as I know, it’s not possible to use basic authentication with Okta.