CAC login flow for using OKTA

I need to do a POC on CAC login flow for using OKTA. Has anyone done this and is there OKTA Java source code for this?

Have you had a chance to take a look at the docs for adding a smart card IDP? Assuming you add the smart card identity provider to your Org, this will be available via the okta-hosted sign-in widget when accessed from any SDK. For example, here’s our Spring Security OAuth sample:

thanks so much - will look into this!

1 Like

Hi,
I’m running the app you referred to. I believe I have it installed locally correctly - builds correctly etc. However when I try to run it with the args provided in the README file I continually get the following error(s):

Unable to resolve Configuration with the provided Issuer of “https://dev-92578275.okta.com/oauth2/default

Unable to resolve Configuration with the provided Issuer of “https://dev-92578275.okta.com/oauth2/default

Caused by: org.springframework.web.client.ResourceAccessException:
I/O error on GET request for “https://dev-92578275.okta.com/oauth2/default/.well-known/openid-configuration”:
Connection reset; nested exception is java.net.SocketException: Connection reset

Caused by: java.net.SocketException: Connection reset

I’ve tried to connect with the default clientId and secret in the README and the ones that were generated for me in the Admin console when I configured the app (which ones are correct?).

Not sure why this is happening.

Thanks!

Hmmm that’s interesting - You’ll want to use the client id/secret for the web app you configured in Okta → Applications. The metadata endpoint (/.wellknown/openid-configuration) and issuer look good to me. Are you by chance behind a firewall? You might need to account for that.

Where is the code that reads the smart card after the smart-card login button is clicked? - I don’t see any in the application you’re referencing above. Thanks for your help!