Get the security identities.

@param null|SecurityIdentityInterface[] $sids The security identities to filter the sharing entries

@return SecurityIdentityInterface[]
962030
private function getSecurityIdentities($sids = null)
    {
        if (null === $sids) {
            $sids = $this->sidManager->getSecurityIdentities($this->tokenStorage->getToken());
        }

        return null !== $sids
            ? $sids
            : [];
    }
482374
private function groupSecurityIdentities(array $sids)
    {
        $groupSids = [];

        if (null === $this->sharingManager) {
            throw new InvalidArgumentException('The "setSharingManager()" must be called before');
        }

        foreach ($sids as $sid) {
            if (IdentityUtils::isValid($sid)) {
                $type = $this->sharingManager->getIdentityConfig($sid->getType())->getType();
                $groupSids[$type][] = $sid->getIdentifier();
            }
        }

        return $groupSids;
    }
1362862
public function getAuthentications( ThreeDSecure\Authentications $authentications,$enrollmentlookup )
    {
       $authentications->setRequiredFields(array('id'));
            $authentications->checkRequiredFields();
            $fields = array();
            if ($enrollmentlookup)
            {
                $fields[]= 'enrollmentchecks';
            }
            $queryStr = array();
            if ($fields)
            {
                $queryStr['fields'] = join(',', $fields);
            }
 
            $request = new Request(array(
                'method' => Request::GET,
                'uri' => $this->prepareURI("/authentications/".$authentications->id),
                'queryStr' => $queryStr
            ));
 
            $response = $this->client->processRequest($request);
            return new ThreeDSecure\Authentications($response);
    }
1088680
private function getRoleNames(array $sids)
    {
        $roles = [];

        foreach ($sids as $sid) {
            if ($sid instanceof RoleSecurityIdentity) {
                $roles[] = $sid->getIdentifier();
            }
        }

        return $roles;
    }
202328
public function getContext($sid) {
        return new CredentialListMappingContext(
            $this->version,
            $this->solution['accountSid'],
            $this->solution['domainSid'],
            $sid
        );
    }
581320
private function enforceSecurityIdentity(&$sid)
    {
        if (
            ($sid instanceof DomainObjectInterface)
        ) {
            $sid = new UserSecurityIdentity($sid->getObjectIdentifier(), get_class($sid));
        } elseif (! ($sid instanceof SecurityIdentityInterface)) {
            throw new InvalidArgumentException('Object must implement ObjectIdentifiableInterface');
        }
    }
507739
protected function addCurrentUser(TokenInterface $token, array $sids)
    {
        if (!$token instanceof AnonymousToken) {
            try {
                $sids[] = UserSecurityIdentity::fromToken($token);
            } catch (\InvalidArgumentException $e) {
                // ignore, user has no user security identity
            }
        }

        return $sids;
    }
1302674
public function getContext($sid) {
        return new PayloadContext(
            $this->version,
            $this->solution['accountSid'],
            $this->solution['referenceSid'],
            $this->solution['addOnResultSid'],
            $sid
        );
    }
1261447
public function getListVariants($sid)
    {
        $product = Product::find($sid);
        
        // No such id
        if ($product == null) {
            $errors = new MessageBag;
            $errors->add('errorNoSuchProduct', Lang::get('redminportal::messages.error_no_such_product'));
            return redirect($this->pageRoute)->withErrors($errors);
        }
        
        $data = array(
            'variantParent' => $product,
            'variants' => $product->variants,
            'imagine' => new RImage
        );
        return view('redminportal::products/list-variants', $data);
    }
598331
public function getAuthenticationScopes(): array
    {

        // If we don't have any authentication data, then
        // only public calls can be made.
        if (is_null($this->getAuthentication()))
            return ['public'];

        // If there are no scopes that we know of, update them.
        // There will always be at least 1 as we add the internal
        // 'public' scope.
        if (count($this->getAuthentication()->scopes) <= 0)
            $this->setAuthenticationScopes();

        return $this->getAuthentication()->scopes;
    }
779606
protected static function getNameAndId($mNameId, &$sName, &$sId)
    {
        if (is_array($mNameId))
        {
            $sName = $mNameId[0];
            $sId = !empty($mNameId[1]) ? $mNameId[1] : null;
        }
        else {
            $sName = $sId = $mNameId;
        }
    }
1203593
public function getAuthenticateData(array $registrations)
    {
        $sigs = array();
        $challenge = $this->createChallenge();
        foreach ($registrations as $reg) {
            if( !is_object( $reg ) ) {
                throw new \InvalidArgumentException('$registrations of getAuthenticateData() method only accepts array of object.');
            }
            /** @var Registration $reg */

            $sig = new SignRequest();
            $sig->appId = $this->appId;
            $sig->keyHandle = $reg->keyHandle;
            $sig->challenge = $challenge;
            $sigs[] = $sig;
        }
        return $sigs;
    }
1343189
protected function getAssignedAddOns() {
        if (!$this->_assignedAddOns) {
            $this->_assignedAddOns = new AssignedAddOnList(
                $this->version,
                $this->solution['accountSid'],
                $this->solution['sid']
            );
        }

        return $this->_assignedAddOns;
    }
1017064
function getUser($sid) {
		if ($this->user == null) {
			$this->user = $this->getUserFromSession($sid);
		}
        return $this->user;
    }
1060432
public function getIdentities()
    {
        $identities = [];

        foreach ($this->getPostCollection() as $post) {
            $identities = array_merge($identities, $post->getIdentities());
        }

        return $identities;
    }
31326
protected function addSpecialRoles(TokenInterface $token, array $sids)
    {
        $sids = $this->injectSpecialRoles($sids);

        if ($this->authenticationTrustResolver->isFullFledged($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_FULLY);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        } elseif ($this->authenticationTrustResolver->isRememberMe($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        } elseif ($this->authenticationTrustResolver->isAnonymous($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        }

        return $sids;
    }
1247866
public function getListByRequestIds($ids)
    {
        $parts = [];
        foreach ($ids as $id) {
            $parts[] = 'request.id:' . $id;
        }
        $qp = new QueryParams();
        $qp->query = join(' OR ', $parts);
        return $this->getList($qp);
    }