Skip to content
Snippets Groups Projects
Select Git revision
  • ll-php8-bs5
  • master default protected
  • 5.x
  • release_5_bs5
  • ll-php8
  • 4.x
  • laminas_migration
  • release_1.0.0.2
  • release_4.0.0
  • release_3.2.8
  • bootstrap4_migration
  • 1.0.0.3
  • 6.0.7
  • 6.0.6
  • 6.0.5
  • 6.0.4
  • 6.0.3
  • 6.0.2
  • 6.0.1
  • 5.1.1
  • 6.0.0
  • 5.1.0
  • 5.0.0
  • 4.0.2
  • 3.2.11
  • 4.0.1
  • 3.2.10
  • 4.0.0
  • 1.0.0.2
  • 3.2.9
  • 3.2.8
31 results

droits.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ZfcUserAuthentication.php 1.67 KiB
    <?php
    
    namespace ZfcUser\Controller\Plugin;
    
    use Laminas\Mvc\Controller\Plugin\AbstractPlugin;
    use Laminas\Authentication\AuthenticationService;
    use Laminas\ServiceManager\ServiceLocatorInterface;
    use ZfcUser\Authentication\Adapter\AdapterChain as AuthAdapter;
    
    class ZfcUserAuthentication extends AbstractPlugin
    {
        /**
         * @var AuthAdapter
         */
        protected $authAdapter;
    
        /**
         * @var AuthenticationService
         */
        protected $authService;
    
        /**
         * @var ServiceLocatorInterface
         */
        protected $serviceLocator;
    
        /**
         * Proxy convenience method
         *
         * @return bool
         */
        public function hasIdentity()
        {
            return $this->getAuthService()->hasIdentity();
        }
    
        /**
         * Proxy convenience method
         *
         * @return mixed
         */
        public function getIdentity()
        {
            return $this->getAuthService()->getIdentity();
        }
    
        /**
         * Get authAdapter.
         *
         * @return ZfcUserAuthentication
         */
        public function getAuthAdapter()
        {
            return $this->authAdapter;
        }
    
        /**
         * Set authAdapter.
         *
         * @param authAdapter $authAdapter
         */
        public function setAuthAdapter(AuthAdapter $authAdapter)
        {
            $this->authAdapter = $authAdapter;
            return $this;
        }
    
        /**
         * Get authService.
         *
         * @return AuthenticationService
         */
        public function getAuthService()
        {
            return $this->authService;
        }
    
        /**
         * Set authService.
         *
         * @param AuthenticationService $authService
         */
        public function setAuthService(AuthenticationService $authService)
        {
            $this->authService = $authService;
            return $this;
        }
    }