Class OAuthClientRegistrationWrapper

java.lang.Object
com.broadleafcommerce.auth.client.domain.OAuthClientRegistrationWrapper
All Implemented Interfaces:
Serializable

public class OAuthClientRegistrationWrapper extends Object implements Serializable
Wrapper for ClientRegistration. This wrapper adds fields for id and tenantId.

This class is necessary because we are not able to use ClientRegistration as the business type counterpart to JpaOAuthClientRegistration. This is because ClientRegistration is marked final and the ModelMapper created in toMe/fromMe methods does not support mapping to final classes.

When extending this domain, if desiring to still use DefaultClientRegistrationPropertiesService, ensure that DefaultClientRegistrationPropertiesService#getWrapperType() is overridden to return the type of your wrapper extension as well.

See Also:
  • Constructor Details

    • OAuthClientRegistrationWrapper

      public OAuthClientRegistrationWrapper()
  • Method Details

    • getId

      public String getId()
      The system ID of the registration
      Returns:
      the system ID of the registration
    • getTenantId

      public String getTenantId()
      The ID of the Tenant this registration belongs to. Different tenants can have different credentials for the same client provider (e.g. Facebook, Google).
      Returns:
      The ID of the Tenant this registration belongs to.
    • getRegistrationId

      public String getRegistrationId()
      See Also:
      • ClientRegistration.getRegistrationId()
    • getClientId

      public String getClientId()
      See Also:
      • ClientRegistration.getClientId()
    • getClientSecret

      public String getClientSecret()
      See Also:
      • ClientRegistration.getClientSecret()
    • getClientAuthenticationMethod

      public String getClientAuthenticationMethod()
      See Also:
      • ClientRegistration.getClientAuthenticationMethod()
    • getAuthorizationGrantType

      public String getAuthorizationGrantType()
      See Also:
      • ClientRegistration.getAuthorizationGrantType()
    • getRedirectUriTemplate

      public String getRedirectUriTemplate()
      See Also:
      • ClientRegistration.getRedirectUri()
    • getScopes

      public Set<String> getScopes()
      See Also:
      • ClientRegistration.getScopes()
    • getProviderDetails

      public OAuthClientRegistrationProviderDetails getProviderDetails()
      See Also:
    • getClientName

      public String getClientName()
      See Also:
      • ClientRegistration.getClientName()
    • setId

      public void setId(String id)
      The system ID of the registration
      Parameters:
      id - the system ID of the registration
    • setTenantId

      public void setTenantId(String tenantId)
      The ID of the Tenant this registration belongs to. Different tenants can have different credentials for the same client provider (e.g. Facebook, Google).
      Parameters:
      tenantId - The ID of the Tenant this registration belongs to.
    • setRegistrationId

      public void setRegistrationId(String registrationId)
      See Also:
      • ClientRegistration.getRegistrationId()
    • setClientId

      public void setClientId(String clientId)
      See Also:
      • ClientRegistration.getClientId()
    • setClientSecret

      public void setClientSecret(String clientSecret)
      See Also:
      • ClientRegistration.getClientSecret()
    • setClientAuthenticationMethod

      public void setClientAuthenticationMethod(String clientAuthenticationMethod)
      See Also:
      • ClientRegistration.getClientAuthenticationMethod()
    • setAuthorizationGrantType

      public void setAuthorizationGrantType(String authorizationGrantType)
      See Also:
      • ClientRegistration.getAuthorizationGrantType()
    • setRedirectUriTemplate

      public void setRedirectUriTemplate(String redirectUriTemplate)
      See Also:
      • ClientRegistration.getRedirectUri()
    • setScopes

      public void setScopes(Set<String> scopes)
      See Also:
      • ClientRegistration.getScopes()
    • setProviderDetails

      public void setProviderDetails(OAuthClientRegistrationProviderDetails providerDetails)
      See Also:
    • setClientName

      public void setClientName(String clientName)
      See Also:
      • ClientRegistration.getClientName()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object