private async Task <ClaimsIdentity> RunTestCase(IConfigurationRetriever <IDictionary <string, HashSet <string> > > configRetriever, string[] requiredEndorsements = null) { var tokenExtractor = new JwtTokenExtractor( emptyClient, EmulatorValidation.ToBotFromEmulatorTokenValidationParameters, AuthenticationConstants.ToBotFromEmulatorOpenIdMetadataUrl, AuthenticationConstants.AllowedSigningAlgorithms, new ConfigurationManager <IDictionary <string, HashSet <string> > >("http://test", configRetriever)); string header = $"Bearer {await new MicrosoftAppCredentials(EnvironmentConfig.TestAppId(), EnvironmentConfig.TestAppPassword()).GetTokenAsync()}"; return(await tokenExtractor.GetIdentityAsync(header, "testChannel", requiredEndorsements)); }
public void EnsureSettings() { testAppId = EnvironmentConfig.TestAppId(); testPassword = EnvironmentConfig.TestAppPassword(); }
public GetTokenRefreshTests() { testAppId = EnvironmentConfig.TestAppId(); testPassword = EnvironmentConfig.TestAppPassword(); }