Class 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:
    OAuthClientRegistrationProviderDetails, Serialized Form
    • Constructor Detail

      • OAuthClientRegistrationWrapper

        public OAuthClientRegistrationWrapper()
    • Method Detail

      • 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.getRedirectUriTemplate()
      • getScopes

        public Set<String> getScopes()
        See Also:
        ClientRegistration.getScopes()
      • 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.getRedirectUriTemplate()
      • setScopes

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

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

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object