Comments (9)
Correct, we don't have explicit support for the AuthenticationClient as starter/auto config.
Your best bet would be to inject the OktaClientProperties
bean, something very similar to what you have now:
@Bean
public AuthenticationClient oktaAuthenticationClient(OktaClientProperties clientProperties) {
return AuthenticationClients.builder()
.setOrgUrl(clientProperties.getOrgUrl())
.build();
}
NOTE: from memory, so there might be a typo
This is very similar to how the OktaSdkConfig
class works for the management client.
There are a few other ways to configure the SDKs, but this option is most inline with a Spring configuration.
Keep us posted!
from okta-auth-java.
Alright !! Thanks .. It is working - I mean deployment went through. I yet have to use it in actual api call. I guess - it doesn't need API token unlike SDK Client to make those call - correct ?
from okta-auth-java.
Correct, the /authn API's do NOT need an API key
Thanks for following up!
from okta-auth-java.
Brian, quick follow-up question
How to get AuthenticationResponse object using this API, if I don't have id / pwd in my spring boot app. I do have Authentication Object in SecurityContext - which don't provide me id_token, which I need for logout URL configuration. Any help / guidance appreciated ..
from okta-auth-java.
@vekdeq
I’m not sure what you are asking, you mentioned an id_token? This library doesn’t handle OAuth flows. Are you asking about our Spring Boot Starter?
from okta-auth-java.
Yes, that's correct. We have a Spring Boot based app using Okta Spring Boot Starter, Okta-Java-SDK, Okta-Authn-Java API calls. We are looking to implement logout functionality - which includes killing app session as well as Okta session too. To kill Okta Session we need to need to implement Okta logout using https://YYYY.oktapreview.com/oauth2/v1/logout?id_token_hint=XXXX api call from Spring boot app. I guess this function is not provided as part of any of APIs and we need to make a get / post call to logout from our middleware (Spring boot app). How to get id_token for that call ? Is there any other way to logout ?
Thanks a bunch in advance
Vivek
from okta-auth-java.
@vekdeq
RP initiates logout is also part of the next Spring Security release. (This lib just sits on top of Spring Sec)
https://spring.io/blog/2019/04/16/spring-security-5-2-0-m2-released
from okta-auth-java.
Hi Brian,
Even after upgrading to Spring Security 5.2.0.M4 the logout is not clearing Okta session. I have updated this in Spring Security Issue as well as below;
We have spring boot based application(s) using Okta as IDP, using okta spring boot starter - which inject Spring Security 5.1.5. With some efforts, I was able to configure gradle script where in my WAR file now have Spring Security 5.2.0.M4 jars. I am still unable to clear / kill Okta Session - after hitting default logout url. It is configured as link (app/logout) on app's UI - so no XHR - just link. Am I missing anything ?
Please guide.
Vivek
from okta-auth-java.
@vekdeq Lets move your Spring related questions to okta/okta-spring-boot or for more general suggestions the Developer Forum
from okta-auth-java.
Related Issues (20)
- Unable to use "correctAnswer" from AuthenticationResponse. HOT 17
- unable to find API to send MFA Enroll activation link via email/sms HOT 3
- Error while updating Plaid SDK 3.5.0 (Duplicate class org.bouncycastle.LICENSE) HOT 3
- Missing nullability annotations in AuthenticationStateHandler HOT 3
- is:issue is:open Okta authentication crashes, maybe okhttp library compatibility. HOT 4
- HttpClientConfiguration.getRequestExecutorParams() deprecated
- AuthenticationException localizedMessages do not adhere to Android device locale settings HOT 1
- authenticationClient.authenticate() does not return locked_out status HOT 1
- 2.0.5 dependencies result in build error HOT 2
- Resend OTP after 5 minutes - MFA. HOT 4
- enrollFactor method HOT 12
- DefaultAuthenticationClient.translateException() should be able to handle null errorCode HOT 2
- Failed resolution of: Ljava/time/format/DateTimeFormatter on Android 7 devices HOT 6
- Getting NoClassDefFound for BaseClient.java while using okta-authn-sdk-api:2.0.9 with okta-sdk-api:10.0.0 HOT 4
- Upgrade dependency okta-sdk-java version HOT 7
- Security vulnerability via transitive `dependencybcprov-jdk18on:1.75` HOT 3
- forgot password with trusted application HOT 9
- Primary authentication with trusted application not supported by SDK HOT 4
- Authentication Client Verify Factor throws Resource Exception instead of AuthenticationException HOT 4
- Incorrect key while retrieving correct answer from EmbeddedResponse HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okta-auth-java.