Ejemplo n.º 1
0
        public MockRestClient SetupForMockRest()
        {
            var client = new MockRestClient();

            Setup(client);
            return(client);
        }
        public void Setup()
        {
            _restClient     = new MockRestClient();
            _cache          = new ConcurrentCache();
            _discovery      = new GSMA.MobileConnect.Discovery.DiscoveryService(_cache, _restClient);
            _authentication = new GSMA.MobileConnect.Authentication.AuthenticationService(_restClient);
            _identity       = new GSMA.MobileConnect.Identity.IdentityService(_restClient);
            _jwks           = new GSMA.MobileConnect.Authentication.JWKeysetService(_restClient, _cache);

            _discoveryResponse = new MobileConnect.Discovery.DiscoveryResponse(_responses["authentication"]);
            _cache.Add(_validSdkSession, _discoveryResponse);

            _config = new MobileConnectConfig
            {
                ClientId     = "zxcvbnm",
                ClientSecret = "asdfghjkl",
                DiscoveryUrl = "qwertyuiop",
                RedirectUrl  = "http://qwertyuiop",
            };

            _mobileConnect = new MobileConnectWebInterface(_discovery, _authentication, _identity, _jwks, _config);
        }
Ejemplo n.º 3
0
        public void Setup()
        {
            _restClient     = new MockRestClient();
            _cache          = new ConcurrentCache();
            _discovery      = new DiscoveryService(_cache, _restClient);
            _authentication = new GSMA.MobileConnect.Authentication.AuthenticationService(_restClient);
            _identity       = new GSMA.MobileConnect.Identity.IdentityService(_restClient);
            _jwks           = new GSMA.MobileConnect.Authentication.JWKeysetService(_restClient, _cache);

            _discoveryResponse = new DiscoveryResponse(_responses["authentication"]);
            _discoveryResponse.ProviderMetadata = JsonConvert.DeserializeObject <ProviderMetadata>(_responses["provider-metadata"].Content);

            _config = new MobileConnectConfig
            {
                ClientId     = "zxcvbnm",
                ClientSecret = "asdfghjkl",
                DiscoveryUrl = "qwertyuiop",
                RedirectUrl  = "http://qwertyuiop",
            };

            _mobileConnect = new MobileConnectInterface(_config, _discovery, _authentication, _identity, _jwks);
        }