Set authenticated state

@param boolean $authenticated
323194
public function setAuthenticated($authenticated)
    {
        // make sure the metaevent is only sent when changing from
        // not-authenticate to authenticated
        if ($authenticated && !$this->authenticated) {
            // metaevent
            $this->getRealm()->publishMeta('wamp.metaevent.session.on_join', [$this->getMetaInfo()]);
        }
        parent::setAuthenticated($authenticated);

    }
841397
public function getUser($authenticate = true)
    {
        if ($this->user) {
            return $this->user;
        } elseif (! $authenticate) {
            return;
        }

        try {
            return $this->user = $this->authenticate();
        } catch (Exception $exception) {
            return;
        }
    }
862000
public function setGranted($isGranted)
    {
        $this->isGranted = (bool) $isGranted;
        $this->skipAuthorizationChecker(true);

        return $this;
    }
656625
@Override
    public boolean validForState(ImapSessionState state) {
        return state == ImapSessionState.AUTHENTICATED
                || state == ImapSessionState.SELECTED;
    }
1296850
public function setIsActive($active)
    {
        $active = $active ? true : false;
        $this->isActive = $active;

        return $this;
    }
351129
public function setAuthHeader($params)
    {
        if (is_array($params)) {
            $this->authHeader = $this->toHeader($params);
        } else {
            if (strpos($params, 'Authorization: ') !== false) {
                $params = str_replace('Authorization: ', '', $params);
            }

            $this->authHeader = $params;
        }
    }
897051
private function processAuthenticate(Session $session, AuthenticateMessage $msg)
    {
        $session->abort(new \stdClass(), 'thruway.error.internal');
        Logger::error($this, 'Authenticate sent to realm without auth manager.');
    }
454179
private function setIssuedAt($issuedAt)
    {
        if (1 !== \preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/', $issuedAt)) {
            throw new AccessTokenException('invalid "expires_at" (syntax)');
        }

        // make sure it is actually a valid date
        try {
            $this->issuedAt = new DateTime($issuedAt);
        } catch (Exception $e) {
            throw new AccessTokenException(
                \sprintf('invalid "expires_at": %s', $e->getMessage())
            );
        }
    }
429804
public function setRequest(RequestInterface $request)
    {
        $e = $this->getEvent();
        $e->setRequest($request);

        $this->getEventManager()->trigger('authenticate.pre', $e);

        $result = $this->getEventManager()->trigger('authenticate', $e, function($test) {
            return ($test instanceof ResponseInterface);
        });

        if ($result->stopped()) {
            if($result->last() instanceof ResponseInterface) {
                return $result->last();
            }

            throw new AuthenticationEventException(sprintf(
                'Auth event was stopped without a response. Got "%s" instead',
                is_object($result->last()) ? get_class($result->last()) : gettype($result->last())
            ));
        }

        if ($e->getIdentity()) {
            $this->getEventManager()->trigger('authenticate.success', $e);
            return true;
        }

        $this->getEventManager()->trigger('authenticate.fail', $e);

        return false;
    }
562208
protected function authenticate($password)
    {
        $message = new Message($password, Message::TYPE_AUTH);
        $response = $this->sendMessage($message);

        if ($response->getType() === Message::TYPE_AUTH_FAILURE) {
            throw new AuthenticationFailedException('Could not authenticate to the server.');
        }
    }
402364
function setState($state) {
		if($state == (self::ALARM_ACTUATOR_STATE_ON or self::ALARM_ACTUATOR_STATE_OFF))
			$this->state = $state;
		else
			throw new \Exception('Invalid AlarmActuator state "'.$state.'"');
	}
896083
public function authenticate(string $password): void
    {
        $salt     = random_bytes(10);
        $keyBasis = $password.$salt;
        $key      = hash(Protocol::PASSWORD_HASH_TYPE, $keyBasis, true);
        $keyHash  = hash(Protocol::PASSWORD_HASH_TYPE, $key);
        $this->setHeader($this->getHeader()." ".strtoupper(Protocol::PASSWORD_HASH_TYPE.":$keyHash.".bin2hex($salt)));

    }
1225640
private function verifyState($state)
    {
        $this->logger->debug('Verify parameter state.');
        $state = urldecode($state);
        $stateArray = [];
        parse_str($state, $stateArray);
        $token = $stateArray['token'];
        $token = preg_replace('~{~', '', $token, 1);
        $token = preg_replace('~}~', '', $token, 1);
        
        if ($token != $this->session->get(static::OPENID_SESSION_TOKEN)) {
            $this->logger->error('The value of the parameter STATE is not equal to the one which is expected');
            throw new SecurityException("The token is invalid.");
        }
    }
68247
public function authenticate($credentials, $remember = false, $login = true)
    {
        try {
            $user = $this->sentinel->authenticate($credentials, $remember, $login);
        } catch (Exception $e) {
            return $this->returnException($e);
        }

        if ($user) {
            $message = request()->expectsJson() ?
                $this->translate('session_initated', 'You have been authenticated.') : null;
            return new SuccessReply($message);
        }

        $message = $this->translate('failed_authorization', 'Access denied due to invalid credentials.');
        return new FailureReply($message);
    }
566908
public function setCredentials(Authentication\AuthenticationInterface $auth)
    {
        // keep BC
        if ($auth instanceof Authentication\Basic) {
            $this->getClient()->addListener(
                new Http\Listener\BasicAuthListener($auth->getUsername(), $auth->getPassword())
            );
        }

        $this->auth = $auth;
    }
735522
public function setAuth(Google_Auth_Abstract $auth)
  {
    $this->config->setAuthClass(get_class($auth));
    $this->auth = $auth;
  }
1313004
public function setState($state)
	{
		if ( $state == $this->getState() ) { return; }

		$this->_values['state'] = (string) $state;
		$this->setModified();
	}