String unlinkProviderKey = prContext.getRequestParameter(PARAM_PROVIDER_FOR_UNLINK);
OAuthProviderType<AccessTokenContext> oauthProviderTypeToUnlink = uiForm.getApplicationComponent(OAuthProviderTypeRegistry.class).getOAuthProvider(unlinkProviderKey, AccessTokenContext.class);
// Obtain current accessToken
AccessTokenContext accessToken = uiForm.getApplicationComponent(SocialNetworkService.class).getOAuthAccessToken(oauthProviderTypeToUnlink, userName);
// Unlink social account in userProfile (AccessTokenInvalidationListener will automatically remove accessToken)
if (oauthProviderTypeToUnlink != null) {
userProfile.setAttribute(oauthProviderTypeToUnlink.getUserNameAttrName(), null);
} else {