Class ClientAttributes
java.lang.Object
org.springframework.security.oauth2.client.web.ClientAttributes
Used for accessing the attribute that stores the the
ClientRegistration.getRegistrationId()
. This ensures that
ClientRegistrationIdProcessor
aligns with all of ways of setting on both
RestClient
and
WebClient
.-
Method Summary
Modifier and TypeMethodDescriptionclientRegistrationId
(String clientRegistrationId) Produces a Consumer that adds theclientRegistrationId
to be used to look up theOAuth2AuthorizedClient
.static String
resolveClientRegistrationId
(Map<String, Object> attributes) Resolves theclientRegistrationId
to be used to look up theOAuth2AuthorizedClient
.
-
Method Details
-
resolveClientRegistrationId
Resolves theclientRegistrationId
to be used to look up theOAuth2AuthorizedClient
.- Parameters:
attributes
- the to search- Returns:
- the registration id to use.
-
clientRegistrationId
Produces a Consumer that adds theclientRegistrationId
to be used to look up theOAuth2AuthorizedClient
.- Parameters:
clientRegistrationId
- theclientRegistrationId
to be used to look up theOAuth2AuthorizedClient
- Returns:
- the
Consumer
to populate the attributes
-