@Test public void testLowerCaseOfResolvedServices() throws Exception { configFile = createTempFileFromResource("org/kaazing/gateway/server/context/parse/data/gateway-config-mixedcase.xml"); GatewayConfigDocument doc = parser.parse(configFile); GatewayContext ctx = resolver.resolve(doc); Collection<? extends ServiceContext> services = ctx.getServices(); for (ServiceContext service : services) { Collection<String> acceptURIs = service.getAccepts(); for (String acceptURI : acceptURIs) { Assert.assertTrue(URIUtils.getHost(acceptURI).equals(URIUtils.getHost(acceptURI).toLowerCase())); } Map<String, ? extends Map<String, ? extends CrossSiteConstraintContext>> crossSiteConstraints = service.getCrossSiteConstraints(); for (String key : crossSiteConstraints.keySet()) { Map<String, ? extends CrossSiteConstraintContext> crossSiteConstraintsByURI = crossSiteConstraints.get(key); for (CrossSiteConstraintContext crossSiteConstraint : crossSiteConstraintsByURI.values()) { String allowOrigin = crossSiteConstraint.getAllowOrigin(); if (!"*".equals(allowOrigin)) { URI originURI = URI.create(allowOrigin); Assert.assertTrue(originURI.getHost().equals(originURI.getHost().toLowerCase())); } } } } }
public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); }
GatewayContextResolver { public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); } }
GatewayContextResolver { public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); } GatewayContextResolver(File configDir, File webDir, File tempDir);  GatewayContextResolver(File configDir, File webDir, File tempDir, MBeanServer mbeanServer);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir, MBeanServer mbeanServer); }
GatewayContextResolver { public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); } GatewayContextResolver(File configDir, File webDir, File tempDir);  GatewayContextResolver(File configDir, File webDir, File tempDir, MBeanServer mbeanServer);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir, MBeanServer mbeanServer); GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc); GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc, Properties configuration); void addInjectable(String key, Object value); Map<String, Object> getInjectables(); ConfigurationObserver getObserver(); void setObserver(ConfigurationObserver observer); }
GatewayContextResolver { public GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc) throws Exception { return resolve(gatewayConfigDoc, System.getProperties()); } GatewayContextResolver(File configDir, File webDir, File tempDir);  GatewayContextResolver(File configDir, File webDir, File tempDir, MBeanServer mbeanServer);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir);  GatewayContextResolver(ContextResolver<SecurityType, DefaultSecurityContext> securityResolver,
                                  File webDir, File tempDir, MBeanServer mbeanServer); GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc); GatewayContext resolve(GatewayConfigDocument gatewayConfigDoc, Properties configuration); void addInjectable(String key, Object value); Map<String, Object> getInjectables(); ConfigurationObserver getObserver(); void setObserver(ConfigurationObserver observer); static final String AUTHORIZATION_MODE_CHALLENGE; static final String AUTH_SCHEME_BASIC; static final String AUTH_SCHEME_NEGOTIATE; static final String AUTH_SCHEME_APPLICATION_TOKEN; static final String AUTH_SCHEME_APPLICATION_PREFIX; }