Пример #1
0
        public async Task Connector_TokenExtractor_NullRequiredEndorsements_ShouldFail()
        {
            var configRetriever = new TestConfigurationRetriever();

            configRetriever.EndorsementTable.Add(KeyId, new HashSet <string>()
            {
                RandomEndorsement, ComplianceEndorsement, TestChannelName
            });
            await RunTestCase(configRetriever);
        }
Пример #2
0
        public async Task Connector_TokenExtractor_RequiredEndorsementsPresent_ShouldValidate()
        {
            var configRetriever = new TestConfigurationRetriever();

            configRetriever.EndorsementTable.Add(KeyId, new HashSet <string>()
            {
                RandomEndorsement, ComplianceEndorsement, TestChannelName
            });
            var claimsIdentity = await RunTestCase(configRetriever, new string[] { ComplianceEndorsement });

            Assert.IsTrue(claimsIdentity.IsAuthenticated);
        }