getServiceLocator()->get(ShibService::class); $shibUser = $shib->getAuthenticatedUser(); $e->addContents('shib', $shibUser); return $shibUser; } /** * Writes $contents to storage * * @param ChainEvent $e * @throws \Zend\Authentication\Exception\ExceptionInterface */ public function write(ChainEvent $e) { $contents = $e->getParam('contents'); $this->resolvedIdentity = null; $this->getStorage()->write($contents); } /** * Clears contents from storage * * @param ChainEvent $e * @throws \Zend\Authentication\Exception\ExceptionInterface */ public function clear(ChainEvent $e) { $this->resolvedIdentity = null; $this->getStorage()->clear(); } /** * getStorage * * @return StorageInterface */ public function getStorage() { if (null === $this->storage) { $this->setStorage(new Session()); } return $this->storage; } /** * setStorage * * @param StorageInterface $storage * @return self */ public function setStorage(StorageInterface $storage) { $this->storage = $storage; return $this; } }