Tests if the current user is authenticated (meaning a user profile exists which is not an {@link AnonymousProfile}).

@return whether the current user is authenticated
438610
public boolean isAuthenticated() {
        try {
            return IS_AUTHENTICATED_AUTHORIZER.isAuthorized(null, getAll(true));
        } catch (final HttpAction e) {
            throw new TechnicalException(e);
        }
    }
1284800
public void authenticate() {
		log.info("Authenticating user: " + this.name);
		WebSession result = null;
		try {
			result = getContext().getAuthenticationMethod().authenticate(
				getContext().getSessionManagementMethod(), this.authenticationCredentials, this);
		} catch (UnsupportedAuthenticationCredentialsException e) {
			log.error("User does not have the expected type of credentials:", e);
		}
		// no issues appear if a simultaneous call to #queueAuthentication() is made
		synchronized (this) {
			this.lastSuccessfulAuthTime = System.currentTimeMillis();
			this.authenticatedSession = result;
		}
	}
712908
@Pure
	public boolean isIdentity() {
        if (this.isIdentity == null) {
            this.isIdentity = MathUtil.isEpsilonZero(this.curvilineTranslation)
                    && MathUtil.isEpsilonZero(this.curvilineTranslation);
        }
        return this.isIdentity.booleanValue();
	}
866536
protected function isCurrentUser()
    {
        return $this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id;
    }
324366
public static @Nonnull Authentication getAuthentication() {
        Authentication a = SecurityContextHolder.getContext().getAuthentication();
        // on Tomcat while serving the login page, this is null despite the fact
        // that we have filters. Looking at the stack trace, Tomcat doesn't seem to
        // run the request through filters when this is the login request.
        // see http://www.nabble.com/Matrix-authorization-problem-tp14602081p14886312.html
        if(a==null)
            a = ANONYMOUS;
        return a;
    }
714458
@CheckReturnValue(when = When.NEVER)
  public boolean isLoggedIn() {
    authLock.readLock().lock();
    try {
      return activeUser != null && activeUser.isLoggedIn();
    } finally {
      authLock.readLock().unlock();
    }
  }
555102
static function isTrusted()
    {
        $ini = eZINI::instance();

        // Check if current user is trusted user.
        $trustedIPs = $ini->hasVariable( 'UserSettings', 'TrustedIPList' ) ? $ini->variable( 'UserSettings', 'TrustedIPList' ) : array();

        // Check if IP address of current user is in $trustedIPs array.
        $trustedUser = eZUser::isUserIPInList( $trustedIPs );
        if ( $trustedUser )
            return true;

        return false;
    }
532666
public function isAuthenticated()
    {
        if(!array_key_exists(self::AUTHENTICATED, $this->_map))
            return false;

        $authc      = $this->_map[self::AUTHENTICATED];
        $authStatus = ($authc != null && $authc);
        return $authStatus;
    }
25893
protected CommonProfile getAuthenticatedProfile(final HttpServletRequest request,
                                                    final HttpServletResponse response,
                                                    final String requiredPermission) {
        val context = new J2EContext(request, response, getUmaConfigurationContext().getSessionStore());
        val manager = new ProfileManager<>(context, context.getSessionStore());
        val profile = manager.get(true).orElse(null);
        if (profile == null) {
            throw new AuthenticationException("Unable to locate authenticated profile");
        }
        if (!profile.getPermissions().contains(requiredPermission)) {
            throw new AuthenticationException("Authenticated profile does not carry the UMA protection scope");
        }
        return profile;
    }
518582
public function isAuthorised()
    {

        if (is_array($this->user) === true
            && isset($this->user['error']) === false
        ) {

            return true;
        }

        return $this->getUser();
    }
498144
public function isAuthenticated()
		{

			// Already authenticated?
			if ($this->_authenticated) return true;


			// Check session
			if (array_key_exists(self::$_sessionPrefix . $this->_name, $_SESSION)) {

				// Get credentials
				$cred = $_SESSION[self::$_sessionPrefix . $this->_name];
				
				// Init model
				$this->_initModel();

				// Find user
				$modelName = $this->_model;
				$user = $modelName::find("first", array(
							$this->_usernameField => $cred['username'],
							$this->_passwordField => $cred['password']
						));

				// Anything?
				if (is_null($user)) {
					return false;
				}

				// Set result
				$this->_result = new AuthResult(AuthResult::SUCCESS, $user);
				$this->_authenticated = true;
				$this->_user = $user;
				return true;

			}

			// Not authenticated.
			return false;

		}
76379
public function isAuthenticated(): bool
    {
        if (!$this->securityContext->canBeInitialized()) {
            return false;
        }

        return array_reduce($this->securityContext->getAuthenticationTokens(), function (bool $isAuthenticated, TokenInterface $token) {
            return $isAuthenticated || $token->isAuthenticated();
        }, false);
    }
1092609
private User checkExistsAndAuthz(final Cache<String, User> cache, final User user, final AuthenticationBackend authenticationBackend,
            final Set<AuthorizationBackend> authorizers) {
        if (user == null) {
            return null;
        }

        try {
            return cache.get(user.getName(), new Callable<User>() { //no cache miss in case of noop
                @Override
                public User call() throws Exception {
                    if (log.isTraceEnabled()) {
                        log.trace("Credentials for user " + user.getName() + " not cached, return from " + authenticationBackend.getType()
                                + " backend directly");
                    }
                    if (authenticationBackend.exists(user)) {
                        authz(user, null, authorizers); //no role cache because no miss here in case of noop
                        return user;
                    }

                    if (log.isDebugEnabled()) {
                        log.debug("User " + user.getName() + " does not exist in " + authenticationBackend.getType());
                    }
                    return null;
                }
            });
        } catch (Exception e) {
            if (log.isDebugEnabled()) {
                log.debug("Can not check and authorize " + user.getName() + " due to " + e.toString(), e);
            }
            return null;
        }
    }
682360
protected function checkAuthentication()
    {
        $authSession = $this->readFromSession();
        if ($authSession) {
            if (isset($authSession['authenticated'])) {
                $this->setAuthenticated($authSession['authenticated']);
            } else {
                $this->setAuthenticated(false);
            }

            if (isset($authSession['data'])) {
                $this->setAuthenticationData($authSession['data']);
            } else {
                $this->setAuthenticationData([]);
            }

            return true;
        }
        return false;
    }
161839
public static function is_loggedin() {
	if (self::is_active() == false) {
		return false;
	}
	if (self::get_user_id() == false) {
		return false;
	}
	
	return true;
}
1172874
public function __isAllowed()
    {
        if ($this->checkAuthentication !== true) {
            // this controller is not responsible for the authentication
            return false;
        }

        $this->typo3Loader->initializeFrontEndUser($this->determinePageIdFromArguments());

        $feUser = $this->typo3Loader->getFrontEndUser();
        if ($feUser->user === null) {
            return false;
        }
        return true;
    }
229496
def exists(self):
        

        # If we made the object under the pretext that it doesn't exist in
        # fedora yet, then assume it doesn't exist in fedora yet.
        if self._create:
            return False

        # If we can get a valid object profile, regardless of its contents,
        # then this object exists. If not, then it doesn't.
        try:
            self.getProfile()
            return True
        except RequestFailed:
            return False