Exemple #1
0
        protected static IContainerConfig ConfigureTheContainer(CngKey cngKey)
        {
            var kc = new FakeEccKeyRepository(cngKey);

            return(Jwt4NetContainer.Configure(
                       As.Issuer("my issuer").WithCngKey(cngKey.KeyName, "https://example.org/"),
                       As.Consumer().TrustIssuer("my issuer", "https://example.org/"))

                   .Replace <ICngKeyProvider, FakeEccKeyRepository>(kc)
                   .Replace <IEccPublicKeyProvider, FakeEccKeyRepository>(kc));
        }
Exemple #2
0
        protected static IContainerConfig ConfigureTheContainer(CngKey cngKey)
        {
             var kc = new FakeEccKeyRepository(cngKey);

            return Jwt4NetContainer.Configure(
                As.Issuer("my issuer").WithCngKey(cngKey.KeyName, "https://example.org/"),
                As.Consumer().TrustIssuer("my issuer", "https://example.org/"))
                
                .Replace<ICngKeyProvider, FakeEccKeyRepository>(kc)
                .Replace<IEccPublicKeyProvider, FakeEccKeyRepository>(kc);
        }