Class UniqueOAuthProviderUsernameListener

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.organization.UserProfileEventListener
io.meeds.oauth.data.UniqueOAuthProviderUsernameListener
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class UniqueOAuthProviderUsernameListener extends org.exoplatform.services.organization.UserProfileEventListener
Listener to validate that OAuth username of given user is unique, because we can't have 2 users in portal with same OAuth username for same OAuthProviderType If OAuth username is not unique, then OAuthException with code OAuthExceptionCode.DUPLICATE_OAUTH_PROVIDER_USERNAME will be thrown and it will encapsulate some other needed info (useful for showing error message)
Author:
Marek Posolda
  • Field Summary

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    preSave(org.exoplatform.services.organization.UserProfile user, boolean isNew)
     

    Methods inherited from class org.exoplatform.services.organization.UserProfileEventListener

    postDelete, postSave, preDelete

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • preSave

      public void preSave(org.exoplatform.services.organization.UserProfile user, boolean isNew) throws Exception
      Overrides:
      preSave in class org.exoplatform.services.organization.UserProfileEventListener
      Throws:
      Exception