Package io.meeds.oauth.data
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)-
Field Summary
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name -
Constructor Summary
ConstructorsConstructorDescriptionUniqueOAuthProviderUsernameListener(SocialNetworkService socialNetworkService, OAuthProviderTypeRegistry oauthProviderTypeRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidpreSave(org.exoplatform.services.organization.UserProfile user, boolean isNew) Methods inherited from class org.exoplatform.services.organization.UserProfileEventListener
postDelete, postSave, preDeleteMethods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
-
Constructor Details
-
UniqueOAuthProviderUsernameListener
public UniqueOAuthProviderUsernameListener(SocialNetworkService socialNetworkService, OAuthProviderTypeRegistry oauthProviderTypeRegistry)
-
-
Method Details