I was very disappointed this feature came very late after introduction of RestClient. These two things should be together shouldn't release after long time. Thanks dan 🙂
This is fantastic Dan, precise and straight to the point. It would be great if you had a similar demo but with Websocket transport instead of REST in the resource server. I'm really tearing my hair out with that right now :)
Hi Dan! Thanks for the helpful videos! What if you need to provide not only the client ID and secret, but also the username and password? So this use case is popular in enterprise m2m microservice-based architecture. What if i need to access multiple resource servers with one oauth2 client but different username and passwords (because of roles).
Hi Dan, I think it would be even better if the "scope" value in your example is an identifier of a resource server instead of "read" to demonstrate that the authorization server can even authorize accesses to multiple resource servers. To make the demo as simple as possible, you may have used the Spring application name of your resource server project, i.e. "resource-server".
Very helpful indeed. Just wondering if oidc could also be integrated?
A nice follow on would be to add keycloak for the auth server.. :) And a comparison between spring 6.3 configuration and spring 6.4 sort of how to upgrade..
19:39 can we set it on the RestClient.Builder as a default ?
Do you mind to give a sample with spring auth server + pkce + oidc? Basically we are trying to plugin a custom auth provider for our front end apps where a enduser is involved and by the way fantastic tutorials. I followed most of your Spring AI videos which made my life a lot easier in understanding some core concepts
is possible to define : .attributes(clientRegistrationId("golf-client")) somehow globally/default, please? In webclient we could define it during builder : oauth2FilterFunction.setDefaultClientRegistrationId(registrationId); and I'm looking for alternative. Thank you.
Hi Dan Vega. Thanks for the wonderfully and straight-forward tutorial, I could also want to know if you have tutorial for authenticating user by generating Bearer token using Oauthj2-Client so that the client-application can path it on the request-header for authorization.??
Great content Dan. I was wondering how do I use this OAuth2 restClient implementation in Spring AI assuming my base Url for OpenAI goes through a OAuth2 enabled gateway?
Hi Dan, thanks for this wonderful video, i am just asking is this interceptor gonna take care of caching and refreshing token to optimize the calls to the authorization server ? i enabled debug logs, and i can see everytime i hit /lessons, client app will go and get a new token
Hello Dan, Thanks a lot for the tutorial! I just have a question. What is the point of creating this in 3 or 4 different modules? Wouldn't it be easier to just have a single project that handles all this by itself? Thanks!
What is the role of an interceptor? I don‘t really get it even after reading online. Does that help to intercept the request and get the token?
Great video, Dan!
thanks a lot, your videos are always great
Super!, thank you Dan 🎯
What about 'two legged authentication' with OAuth (basically obtaining a request-token first and then use it to get the access-token)? Can this be configured with the latest RestClient?
Would be nice to see how to cache in memory the token until it expires, to minimize the calls to the authorization server.
@timta4624