Class DefaultClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper>
- java.lang.Object
-
- com.broadleafcommerce.auth.client.registration.DefaultClientRegistrationPropertiesService<P>
-
- All Implemented Interfaces:
ClientRegistrationPropertiesService<P>
public class DefaultClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper> extends Object implements ClientRegistrationPropertiesService<P>
This service providesOAuthClientRegistrationWrapper
objects built fromOAuth2ClientProperties
defined through application properties. All methods of this class will gracefully return null if theOAuth2ClientProperties
properties are not set.
-
-
Constructor Summary
Constructors Constructor Description DefaultClientRegistrationPropertiesService(org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientProperties oAuth2ClientProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description P
get(String registrationId)
Get anOAuthClientRegistrationWrapper
that is defined in application properties.Collection<P>
getAll()
Get allOAuthClientRegistrationWrapper
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 fromClientRegistration.getRegistrationId()
protected Class<P>
getWrapperType()
Extension point for those who extendOAuthClientRegistrationWrapper
.P
wrapClientRegistration(@NonNull org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration)
Converts aClientRegistration
to aOAuthClientRegistrationWrapper
.
-
-
-
Method Detail
-
get
public P get(String registrationId)
Description copied from interface:ClientRegistrationPropertiesService
Get anOAuthClientRegistrationWrapper
that is defined in application properties.- Specified by:
get
in interfaceClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper>
- Returns:
-
getAll
public Collection<P> getAll()
Description copied from interface:ClientRegistrationPropertiesService
Get allOAuthClientRegistrationWrapper
objects that are defined in application properties.- Specified by:
getAll
in interfaceClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper>
- Returns:
-
wrapClientRegistration
public P wrapClientRegistration(@NonNull @NonNull org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration)
Description copied from interface:ClientRegistrationPropertiesService
Converts aClientRegistration
to aOAuthClientRegistrationWrapper
.- Specified by:
wrapClientRegistration
in interfaceClientRegistrationPropertiesService<P extends OAuthClientRegistrationWrapper>
- Returns:
- OAuthClientRegistrationWrapper
-
getWrapperType
protected Class<P> getWrapperType()
Extension point for those who extendOAuthClientRegistrationWrapper
.- Returns:
- The type of
OAuthClientRegistrationWrapper
to use as a wrapper forClientRegistration
.
-
-