public class DefaultClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper> extends Object implements ClientRegistrationPropertiesService<P>
OAuthClientRegistrationWrapper objects built from
OAuth2ClientProperties defined through application properties. All methods of this class
will gracefully return null if the OAuth2ClientProperties properties are not set.| Constructor and Description |
|---|
DefaultClientRegistrationPropertiesService(org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties oAuth2ClientProperties) |
| Modifier and Type | Method and Description |
|---|---|
P |
get(String registrationId)
Get an
OAuthClientRegistrationWrapper that is defined in application properties. |
Collection<P> |
getAll()
Get all
OAuthClientRegistrationWrapper objects that are defined in application
properties. |
protected Map<String,org.springframework.security.oauth2.client.registration.ClientRegistration> |
getClientRegistrations()
Map of ClientRegistrations defined via application properties The key is set from
ClientRegistration.getRegistrationId() |
protected Class<P> |
getWrapperType()
Extension point for those who extend
OAuthClientRegistrationWrapper. |
P |
wrapClientRegistration(@NonNull org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration)
Converts a
ClientRegistration to a OAuthClientRegistrationWrapper. |
public DefaultClientRegistrationPropertiesService(@Nullable
org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties oAuth2ClientProperties)
public P get(String registrationId)
ClientRegistrationPropertiesServiceOAuthClientRegistrationWrapper that is defined in application properties.get in interface ClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper>public Collection<P> getAll()
ClientRegistrationPropertiesServiceOAuthClientRegistrationWrapper objects that are defined in application
properties.getAll in interface ClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper>public P wrapClientRegistration(@NonNull @NonNull org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration)
ClientRegistrationPropertiesServiceClientRegistration to a OAuthClientRegistrationWrapper.wrapClientRegistration in interface ClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper>protected Class<P> getWrapperType()
OAuthClientRegistrationWrapper.OAuthClientRegistrationWrapper to use as a wrapper for
ClientRegistration.Copyright © 2021. All rights reserved.