[Question] Switch user scope for cf-java-client
See original GitHub issueHey team,
Could you please let me know if it is feasible to build the CloudFoundryClient
by an access token (we only see RefreshTokenGrantTokenProvider
, PasswordGrantTokenProvider
, OneTimePasscodeTokenProvider
, ClientCredentialsGrantTokenProvider
)? Should there be something like AccessTokenGrantTokenProvider
?
Currently in our use case, users log in using OAuth2, if successful, we retrieve the access token in Spring’s Security Context and put that into Authorization header of request to query data from Cloud Controller Rest endpoints manually. Do you think it’s feasible to switch to use cf-java-client
instead? If so, how?
To be honest, we really hope to be able to use the lib since current process is very tedious and error-prone as you have to communicate to rest endpoints and parse those responses manually.
Please share if you have any idea.
Thank you, Tom
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
I confirm its coming for 3.0.6/3.1.M1, its a major story for us and a unique alternative to thread local context passing in reactive world.
While the Hystrix case itself doesn’t work for us, the general idea is what we’re pursuing. Coming in a future version of Reactor (3.1?) is the3 ability to attach “context” to a flow. That context will be transfer across thread boundaries and coordinated properly without user intervenation. @smaldini can elaborate more/point at discussions. I’d implement the TokenProvider by storing the
SecurityContext
In that flow context and retrieve when necessary.