Class AccessTokenContextRelay
java.lang.Object
org.springframework.cloud.commons.security.AccessTokenContextRelay
Convenience class for relaying an access token from the
SecurityContext to the
OAuth2ClientContext. If successful then subsequent calls to an
OAuth2RestTemplate using the context contained here will use the same access
token. This is mostly useful for relaying calls to a resource server downstream to
other resource servers. If the access token expires there is no way to refresh it, so
expect an exception from downstream (propagating it to the caller is the best strategy,
so they can refresh it and try again).- Author:
- Dave Syer
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AccessTokenContextRelay
public AccessTokenContextRelay()
-