public DefaultConsentServiceTests() { _clock.UtcNowFunc = () => UtcNow; _client = new Client { ClientId = "client", RequireConsent = true, RequirePkce = false }; _user = new IdentityServerUser("bob") { AdditionalClaims = { new Claim("foo", "foo1"), new Claim("foo", "foo2"), new Claim("bar", "bar1"), new Claim("bar", "bar2"), new Claim(JwtClaimTypes.AuthenticationContextClassReference, "acr1") } }.CreatePrincipal(); _subject = new DefaultConsentService(_clock, _userConsentStore, TestLogger.Create <DefaultConsentService>()); }
public DefaultConsentServiceTests() { scopes = new List <string> { "read", "write" }; client = new Client { ClientId = "client", AllowRememberConsent = true, RequireConsent = true }; user = new ClaimsPrincipal(new ClaimsIdentity(new Claim[] { new Claim(Constants.ClaimTypes.Subject, "123") }, "password")); store = new InMemoryConsentStore(); subject = new DefaultConsentService(store); }
public DefaultConsentServiceTests() { _client = new Client { ClientId = "client" }; _user = IdentityServerPrincipal.Create("bob", "bob", new Claim[] { new Claim("foo", "foo1"), new Claim("foo", "foo2"), new Claim("bar", "bar1"), new Claim("bar", "bar2"), new Claim(JwtClaimTypes.AuthenticationContextClassReference, "acr1") }); _subject = new DefaultConsentService(_userConsentStore); }