This is called when login with OpenID succeeded and it's not
        necessary to figure out if this is the users's first login or not.
541161
def _on_auth(self, user):
        
        app = current_app._get_current_object()
        if not user:
            # Google auth failed.
            login_error.send(app, user=None)
            abort(403)
        session["openid"] = user
        login.send(app, user=user)
        return redirect(request.args.get("next", None) or request.referrer or "/")
33087
function isLogin()
    {
        if (isset($_SESSION[self::$session_prefix . 'isLogin']) and $_SESSION[self::$session_prefix . 'isLogin'] == 1)
        {
            return true;
        }
        return false;
    }
228193
public static boolean loginAtStart() {
		boolean loginAtStart = Application.getInstance().isLoginRequired() || Configuration.get("MjLoginAtStart", "false").equals("true");
		if (loginAtStart && !Backend.getInstance().isAuthenticationActive()) {
			throw new IllegalStateException("Login required but authorization is not configured!");
		}
		return loginAtStart;
	}
687450
def confirm_login():
    '''
    
    '''
    session['_fresh'] = True
    session['_id'] = current_app.login_manager._session_identifier_generator()
    user_login_confirmed.send(current_app._get_current_object())
1212153
def save_checkid_request
      clear_checkid_request
      request = OpenIdRequest.create!(:parameters => openid_params)
      session[:request_token] = request.token

      request
    end
1324366
private boolean okayToSendServerStarted() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "okayToSendServerStarted", this);

        synchronized (lockObject) {
            if (!_sentServerStarted) {
                if ((_state == STATE_STARTED) && _mainImpl.isServerStarted()) {
                    _sentServerStarted = true;
                }
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "okayToSendServerStarted", new Boolean(_sentServerStarted));
        return _sentServerStarted;
    }
24091
def after_initial_login(self, response):
        
        if LOGIN_FAILURE_MSG in response.text:
            self.logger.error(
                "Credentials failed. Either add/update the current credentials "
                "or remove them to enable auto auth"
            )
            return

        self.logger.info("successfully completed initial login")

        if self.single_url:
            yield scrapy.Request(
                self.single_url,
                callback=self.parse_item,
                errback=self.handle_error
            )
        else:
            for url in self.start_urls:
                yield scrapy.Request(
                    url,
                    callback=self.analyze_url_list,
                    errback=self.handle_error
                )
920174
function checkAuthenticated(req, res, next) {
	if (!req.user) {
		api.writeError(401, res, "Not authenticated");
	} else {
		req.user.workspaceDir = workspaceDir + (req.user.workspace ? "/" + req.user.workspace : "");
		req.user.checkRights = checkRights;
		next();
	}
}
831326
public function isLogged() {
        if (!$this->isLogged) return false;
        if ($this->genUID()!=$this->uid) return false; // uid doesn't correspond.
        return true;
    }
149341
function(options) {
      var storedUser = ((!this.isOAuth2Mode() && this.Storage.retrieve(this.loggedInUserKey)) || this.Storage.retrieve('oauth2.user'));
      //The logged in user's ID is saved in local storage until removed, so we need to check to make sure that the user has valid login credentials before returning the login ID.
      if ( options && options['success'] ){
        this.hasValidOAuth(options);
      } else {
        return (this.isLoggedIn(options) && storedUser) ? storedUser : null;
      }
    }
604878
function onGetRedirectResult() {
  auth.getRedirectResult().then(function(response) {
    log('Redirect results:');
    if (response.credential) {
      log('Credential:');
      log(response.credential);
    } else {
      log('No credential');
    }
    if (response.user) {
      log('User\'s id:');
      log(response.user.uid);
    } else {
      log('No user');
    }
    logAdditionalUserInfo(response);
    console.log(response);
  }, onAuthError);
}
845938
function isLocked()
    {
        $userID = $this->attribute( 'contentobject_id' );
        $isNotLocked = eZUser::isEnabledAfterFailedLogin( $userID, true );
        return !$isNotLocked;
    }
714458
@CheckReturnValue(when = When.NEVER)
  public boolean isLoggedIn() {
    authLock.readLock().lock();
    try {
      return activeUser != null && activeUser.isLoggedIn();
    } finally {
      authLock.readLock().unlock();
    }
  }
598211
protected function isAllowed()
    {
        /** @var  \Arcanesoft\Contracts\Auth\Models\User  $user */
        if (is_null($user = auth()->user()))
            return false;

        return $user->isAdmin() || $user->isModerator();
    }
63227
private function requestIsValid(): bool
    {
        return $this->request->has(self::OPENID_ASSOC_HANDLE)
            && $this->request->has(self::OPENID_SIGNED)
            && $this->request->has(self::OPENID_SIG);
    }
1285027
def oid_login_handler(self, f, oid):
        
        if request.args.get("openid_complete") != u"yes":
            return f(False)
        consumer = Consumer(SessionWrapper(self), oid.store_factory())
        openid_response = consumer.complete(
            request.args.to_dict(), oid.get_current_url()
        )
        if openid_response.status == SUCCESS:
            return self.after_login(OpenIDResponse(openid_response, []))
        elif openid_response.status == CANCEL:
            oid.signal_error(u"The request was cancelled")
            return redirect(oid.get_current_url())
        oid.signal_error(u"OpenID authentication error")
        return redirect(oid.get_current_url())
1154438
private String isLoggedIn() throws RuntimeException {
        if(this.getUser() != null && this.getUser().getAuthToken() != null){
            return "CUSTOM " + this.getUser().getAuthToken();
        } else {
            throw new RuntimeException("User state error.");
        }
    }