Package io.meeds.oauth.service.impl
Class OAuthRegistrationServiceImpl
java.lang.Object
io.meeds.oauth.service.impl.OAuthRegistrationServiceImpl
- All Implemented Interfaces:
OAuthRegistrationService
-
Constructor Summary
ConstructorsConstructorDescriptionOAuthRegistrationServiceImpl(org.exoplatform.container.PortalContainer container, org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.container.xml.InitParams initParams) -
Method Summary
Modifier and TypeMethodDescriptionorg.exoplatform.services.organization.UsercreateGateInUser(OAuthPrincipal<? extends AccessTokenContext> principal) Creates a new User with oAuth authenticated user attributesorg.exoplatform.services.organization.UserdetectGateInUser(jakarta.servlet.http.HttpServletRequest request, OAuthPrincipal<? extends AccessTokenContext> principal) attempts to detect if a user account already exists for current social network userbooleanisRegistrationOnFly(OAuthProviderType<? extends AccessTokenContext> oauthProviderType) voidupdateCustomClaimsInProfile(org.exoplatform.services.organization.User user, OAuthPrincipal<? extends AccessTokenContext> principal) Saves user OAuth profile attributes inUserProfileentityvoidupdateUserIdentityAvatar(String username, OAuthPrincipal<? extends AccessTokenContext> principal) Saves User Avatar from oAuth Provider into userIdentityvoidupdateUserProfileAttributes(String username, OAuthProviderType<?> providerType) Saves user OAuth profile attributes inUserProfileentity
-
Constructor Details
-
OAuthRegistrationServiceImpl
public OAuthRegistrationServiceImpl(org.exoplatform.container.PortalContainer container, org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, org.exoplatform.container.xml.InitParams initParams)
-
-
Method Details
-
isRegistrationOnFly
public boolean isRegistrationOnFly(OAuthProviderType<? extends AccessTokenContext> oauthProviderType) - Specified by:
isRegistrationOnFlyin interfaceOAuthRegistrationService
-
detectGateInUser
public org.exoplatform.services.organization.User detectGateInUser(jakarta.servlet.http.HttpServletRequest request, OAuthPrincipal<? extends AccessTokenContext> principal) Description copied from interface:OAuthRegistrationServiceattempts to detect if a user account already exists for current social network user- Specified by:
detectGateInUserin interfaceOAuthRegistrationService- Parameters:
request-principal-- Returns:
- existing user
-
createGateInUser
public org.exoplatform.services.organization.User createGateInUser(OAuthPrincipal<? extends AccessTokenContext> principal) Description copied from interface:OAuthRegistrationServiceCreates a new User with oAuth authenticated user attributes- Specified by:
createGateInUserin interfaceOAuthRegistrationService- Parameters:
principal-OAuthPrincipalof authenticated user- Returns:
- newly created user
-
updateCustomClaimsInProfile
public void updateCustomClaimsInProfile(org.exoplatform.services.organization.User user, OAuthPrincipal<? extends AccessTokenContext> principal) Description copied from interface:OAuthRegistrationServiceSaves user OAuth profile attributes inUserProfileentity- Specified by:
updateCustomClaimsInProfilein interfaceOAuthRegistrationService- Parameters:
user- existingUserentity username attributeprincipal-OAuthPrincipalof authenticated user
-
updateUserProfileAttributes
public void updateUserProfileAttributes(String username, OAuthProviderType<?> providerType) throws Exception Description copied from interface:OAuthRegistrationServiceSaves user OAuth profile attributes inUserProfileentity- Specified by:
updateUserProfileAttributesin interfaceOAuthRegistrationService- Parameters:
username- existingUserentity username attributeproviderType-OAuthProviderType- Throws:
Exception- when error occurs while saving user profile
-
updateUserIdentityAvatar
public void updateUserIdentityAvatar(String username, OAuthPrincipal<? extends AccessTokenContext> principal) Description copied from interface:OAuthRegistrationServiceSaves User Avatar from oAuth Provider into userIdentity- Specified by:
updateUserIdentityAvatarin interfaceOAuthRegistrationService- Parameters:
username- existingUserentity username attributeprincipal-OAuthPrincipalof authenticated user
-