-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancementA general enhancement
Milestone
Description
A resource server can propagate the bearer token by fashioning an ExchangeFilterFunction
:
ExchangeFilterFunction oauth2 = (request, next) -> {
AbstractOAuth2TokenAuthenticationToken<?> authentication =
(AbstractOAuth2TokenAuthenticationToken<?>)
SecurityContextHolder.getContext().getAuthentication();
request.headers().setBearerAuth(authentication.getToken().getTokenValue());
return next.exchange(request);
};
It would be nice to remove some of this boilerplate.
Metadata
Metadata
Assignees
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancementA general enhancement