Get the currently authenticated acct.

@return Account|null
519181
public function acct()
	{
		if ( $this->loggedOut )
			return null;

		// If we've already retrieved the acct for the current request we can just
		// return it back immediately. We do not want to fetch the acct data on
		// every call to this method because that would be tremendously slow.
		if ( !is_null( $this->acct ) )
			return $this->acct;

		$id = $this->session->get( $this->getName() );

		// First we will try to load the acct using the identifier in the session if
		// one exists. Otherwise we will check for a "remember me" cookie in this
		// request, and if one exists, attempt to retrieve the acct using that.
		$acct = null;

		if ( !is_null( $id ) )
			$acct = $this->auth->retrieveById( $id );

		// If the acct is null, but we decrypt a "recaller" cookie we can attempt to
		// pull the acct data on that cookie which serves as a remember cookie on
		// the application. Once we have a acct we can return it to the caller.
		$recaller = $this->getRecaller();

		if ( is_null( $acct ) && !is_null( $recaller ) )
		{
			$acct = $this->getAcctByRecaller( $recaller );

			if ( $acct )
			{
				$this->updateSession( $acct->getAuthIdentifier() );
				$this->fireLoginEvent( $acct, true );
			}
		}

		return $this->acct = $acct;
	}
571275
public function getClientAccount() {
		if ($this->impersonatedAccount !== NULL) {
			return $this->impersonatedAccount;
		} else {
			return $this->authenticationManager->getSecurityContext()->getAccount();
		}
	}
24762
public function getAccessToken()
    {
        /** @var AccessToken $accessToken */
        if ($accessToken = $this->cache->get(static::SESSION_ACCESS_TOKEN_KEY)) {
            if (!$accessToken->hasExpired()) {
                return $accessToken;
            }
        }
        $accessToken = $this->authClient->getAccessToken('client_credentials');
        $ttl = $accessToken->getExpires() - time();
        $this->cache->save(static::SESSION_ACCESS_TOKEN_KEY, $accessToken, $ttl);

        return $accessToken;
    }
1114764
private function authenticateByToken()
    {
        $tokenType = $this->tokenType();
        $authToken = $this->tokenFactory()->create($tokenType);

        if ($authToken->metadata()->enabled() !== true) {
            return null;
        }

        $tokenData = $authToken->getTokenDataFromCookie();
        if (!$tokenData) {
            return null;
        }
        $userId = $authToken->getUserIdFromToken($tokenData['ident'], $tokenData['token']);
        if (!$userId) {
            return null;
        }

        $u = $this->userFactory()->create($this->userType());
        $u->load($userId);

        if ($u->id()) {
            $u->saveToSession();
            return $u;
        } else {
            return null;
        }
    }
513500
public function getAccessTokenByAuth()
    {
        if ($this->accessToken) {
            return $this->accessToken;
        }

        if ($this->authed) {
            $this->accessToken = $this->wechatComponentApi->getAuthorizerAccessToken(
                $this->getAppId(),
                $this->getRefreshToken()
            );
        } else {
            $this->getAccessToken();
        }

        return $this->accessToken;
    }
1053981
public function getAccounts()
    {
        $dialog = $this->getDialog();
        $result = $dialog->syncDialog();
        $this->bankName = $dialog->getBankName();
        $accounts = new GetAccounts($result);

        return $accounts->getAccountsArray();
    }
376327
public function findOneHavingAccount(Account $account)
    {
        $query = $this->createQuery();

        return $query->matching($query->contains('accounts', $account))->execute()->getFirst();
    }
1337357
public function getOAuthToken()
    {
        // If any of the required fields are empty, return null.
        $hasAnEmptyField = empty($this->northstar_id) || empty($this->access_token) ||
            empty($this->access_token_expiration) || empty($this->refresh_token) || empty($this->role);

        if ($hasAnEmptyField) {
            return null;
        }

        return new AccessToken([
            'resource_owner_id' => $this->getNorthstarIdentifier(),
            'access_token' => $this->access_token,
            'refresh_token' => $this->refresh_token,
            'expires' => $this->access_token_expiration,
            'role' => $this->role,
        ]);
    }
1257786
public function getAccounts()
    {
        $accounts = $this->serviceHelper->getService()->management_accounts->listManagementAccounts()->getItems();
        $data = array();

        foreach ($accounts as $account) {
            $data[$account->getName()] = array(
                    'accountId' => $account->getId(),
                    'accountName' => $account->getName(),
                );
        }
        ksort($data);

        return $data;
    }
1136701
public function getToken()
  {

    if ($this->has('token'))
    {
      return $this->get('token');
    }

    if ($this->has('access_token'))
    {
      return $this->get('access_token');
    }

    if ($this->has('accessToken'))
    {
      return $this->get('accessToken');
    }

    if ($authorization = $this->getHeader('AUTHORIZATION'))
    {
      return $authorization;
    }

    return null;
  }
250242
public function getUser()
    {
        if (null === $token = $this->security->getToken()) {
            return null;
        }

        $user = $token->getUser();

        if (! is_object($user)) {
            return null;
        }

        return $user;
    }
1284224
public function getAccountKey($key, $default = null, $account = null)
    {
        if (!$this->account || ($account && $account !== $this->account)) {
            $this->useAccount($account);
        }

        return Core::instance()->getConfig("accounts.{$this->account}.{$key}", $default);
    }
222778
public function getAccount()
    {
        if (false !== ($response = $this->request('api/CekSaldo.php'))) {
            $account = [
                'username' => $response['Username'],
                'balance' => $response['Saldo'],
                'status' => $this->checkAccountStatus($response['Username'])
            ];

            return $account;
        }

        return false;
    }
248866
public static function getCurrentUser()
    {
        if (static::$currentUser instanceof AVUser)
        {
            return static::$currentUser;
        }
        $storage = AVClient::getStorage();
        $userData = $storage->get("user");
        if ($userData instanceof AVUser)
        {
            static::$currentUser = $userData;

            return $userData;
        }
        if (isset($userData["id"]) && isset($userData["_sessionToken"]))
        {
            $user = AVUser::create("_User", $userData["id"]);
            unset($userData["id"]);
            $user->_sessionToken = $userData["_sessionToken"];
            unset($userData["_sessionToken"]);
            foreach ($userData as $key => $value)
            {
                $user->set($key, $value);
            }
            $user->_opSetQueue = array();
            static::$currentUser = $user;

            return $user;
        }

        return null;
    }
630283
public function getIPaymentAccount()
    {
        if ($this->_sIPaymentAccount === null) {
            $this->_sIPaymentAccount = false;
            $this->_sIPaymentAccount = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iShopID_iPayment_Account');
        }

        return $this->_sIPaymentAccount;
    }
643057
public function getAccessToken() {
    $session = $this->getSession();
    // either user session signed, or app signed
    if ($session) {
      return $session['access_token'];
    } else {
      return $this->getAppId() .'|'. $this->getApiSecret();
    }
  }
116174
public function getAuthenticatedUser()
    {
        $user = $this->getStorage()
                     ->getAuthenticatedUser($this->request, $this->response);

        if ($user) {
            // check if the user needs 2FA verification
            $twoFactor = $this->getTwoFactorStrategy();
            if ($twoFactor && !$user->isTwoFactorVerified() && $twoFactor->needsVerification($user)) {
                $user->markSignedOut();
            }

            $this->setCurrentUser($user);
        } else {
            // if no current user then sign in a guest
            $user = $this->signInUser($this->getGuestUser());
        }

        return $user;
    }