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