protected function getProviderFactoryBasedOnConfig(UserConfig $userConfig)
    {
        $areaId   = $userConfig->provider->getAreaId();
        $area     = $this->twoFactorProvidersService->getAreaManager()->getById($areaId);
        $provider = $this->twoFactorProvidersService->getEnabledInArea($area);

        $data = [
            'id'  => array_get($provider->settings, 'client_id'),
            'key' => array_get($provider->settings, 'secret_key'),
        ];

        return new Yubikey($data);
    }
protected function getProviderFactoryBasedOnConfig(UserConfig $userConfig)
    {
        $areaId   = $userConfig->provider->getAreaId();
        $area     = $this->twoFactorProvidersService->getAreaManager()->getById($areaId);
        $provider = $this->twoFactorProvidersService->getEnabledInArea($area);

        $data = [
            'id'  => array_get($provider->settings, 'client_id'),
            'key' => array_get($provider->settings, 'secret_key'),
        ];

        return new Yubikey($data);
    }
protected function getProviderFactoryBasedOnConfig ( UserConfig $ userConfig ) { $ areaId = $ userConfig -> provider -> getAreaId ( ) ; $ area = $ this -> twoFactorProvidersService -> getAreaManager ( ) -> getById ( $ areaId ) ; $ provider = $ this -> twoFactorProvidersService -> getEnabledInArea ( $ area ) ; $ data = [ 'id' => array_get ( $ provider -> settings , 'client_id' ) , 'key' => array_get ( $ provider -> settings , 'secret_key' ) , ] ; return new Yubikey ( $ data ) ; }
Setups the Yubikey factory based on area settings.

@param UserConfig $userConfig
@return Yubikey
Setups the Yubikey factory based on area settings .