public MobileConnectInterface(IDiscoveryService discovery, IAuthenticationService authentication, MobileConnectConfig config)
        {
            var cache  = discovery.Cache;
            var client = new Utils.RestClient();

            this._discovery      = discovery;
            this._authentication = authentication;
            this._identity       = new IdentityService(client);
            this._jwks           = new JWKeysetService(client, cache);
            this._config         = config;
        }
        public MobileConnectWebInterface(IDiscoveryService discovery, IAuthenticationService authentication, MobileConnectConfig config)
        {
            var cache  = discovery.Cache;
            var client = new Utils.RestClient();

            this._discovery          = discovery;
            this._authentication     = authentication;
            this._identity           = new IdentityService(client);
            this._jwks               = new JWKeysetService(client, cache);
            this._config             = config;
            this._cacheWithSessionId = config.CacheResponsesWithSessionId && _discovery.Cache != null;

            Log.Debug(() => _cacheWithSessionId ? $"MobileConnectWebInterface caching enabled with type={cache.GetType().AssemblyQualifiedName}" : "MobileConnectWebInterface caching disabled");
        }