@Override
public void connect() {
OAuthService currentService;
OAuthSession currentSession;
if (serviceName != null) {
MultiServicesManager manager = multiServicesManager;
manager.connectCurrentService();
currentService = manager.getCurrentService();
currentSession = manager.getCurrentSession();
} else {
currentService = getUnambiguousService();
currentSession = currentService.getSession();
currentService.initAccessToken();
}
OAuthUser user = new OAuthUser(currentService.getType(), currentSession.getUserProfile());
if (isIdentityManaged()) {
// By default we set the status to FAILURE, if we manage to get to the end
// of this method we get rewarded with a SUCCESS
setStatus(AuthenticationStatus.FAILURE);