예제 #1
0
        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));
        }
예제 #2
0
 public void EnsureSettings()
 {
     testAppId    = EnvironmentConfig.TestAppId();
     testPassword = EnvironmentConfig.TestAppPassword();
 }
예제 #3
0
 public GetTokenRefreshTests()
 {
     testAppId    = EnvironmentConfig.TestAppId();
     testPassword = EnvironmentConfig.TestAppPassword();
 }