public TestJwtClaimValidatorTests()
        {
            var logger = new TestLogger <TestJwtClaimValidator>();

            _Server = WireMockServer.Start();
            _TestJwtClaimValidator =
                new TestJwtClaimValidator(TestTheIdentityHubServiceCreator.CreateInstance(_Server), logger, null !);
        }
Exemplo n.º 2
0
        public JwtClaimValidatorTests()
        {
            var logger = new TestLogger <JwtClaimValidator>();

            _DateTimeProvider  = new StandardUtcDateTimeProvider();
            _Server            = WireMockServer.Start();
            _JwtClaimValidator =
                new JwtClaimValidator(TestTheIdentityHubServiceCreator.CreateInstance(_Server), logger,
                                      _DateTimeProvider,
                                      new HardCodedIccPortalConfig(null, "http://test.test", "test_secret123", _ClaimLifetimeHours, true));
        }
        public JwtClaimValidatorTests()
        {
            var logger = new TestLogger <JwtClaimValidator>();

            _DateTimeProvider = new StandardUtcDateTimeProvider();
            _Server           = WireMockServer.Start();

            var iccPortalConfigMock = new Mock <IIccPortalConfig>();

            iccPortalConfigMock.Setup(x => x.ClaimLifetimeHours).Returns(_ClaimLifetimeHours);
            iccPortalConfigMock.Setup(x => x.FrontendBaseUrl).Returns("http://test.test");
            iccPortalConfigMock.Setup(x => x.JwtSecret).Returns("test_secret123");
            iccPortalConfigMock.Setup(x => x.StrictRolePolicyEnabled).Returns(true);

            _JwtClaimValidator =
                new JwtClaimValidator(TestTheIdentityHubServiceCreator.CreateInstance(_Server), logger,
                                      _DateTimeProvider,
                                      iccPortalConfigMock.Object);
        }