public void GetConfiguration_should_set_endpoint_based_on_environment(TrusonaEnvironment environment, string expectedUrl) { var res = sut.GetConfiguration(environment, null, null); res.EndpointUrl.AbsoluteUri.Should().Be(expectedUrl); }
/// <summary> /// Initializes a new instance of the <see cref="T:TrusonaClient.API.Trusona"/> class. /// </summary> /// <param name="token">Token.</param> /// <param name="secret">Secret.</param> /// <param name="environment">Environment.</param> public Trusona(string token, string secret, TrusonaEnvironment environment = defaultEnv) : this(new ServiceFactory(new ConfigurationFactory().GetConfiguration(environment, token, secret))) { }
public IConfiguration GetConfiguration(TrusonaEnvironment environment, string token, string secret) { var endpoint = endpoints[environment]; return(new Configuration(endpoint, token, secret)); }