Package org.springframework.security.web.header.writers.frameoptions

Examples of org.springframework.security.web.header.writers.frameoptions.StaticAllowFromStrategy


                        parserContext.getReaderContext().error("Strategy requires a 'value' to be set.", frameElt);
                    }
                    // static, whitelist, regexp
                    if ("static".equals(strategy)) {
                        try {
                            builder.addConstructorArgValue(new StaticAllowFromStrategy(new URI(value)));
                        } catch (URISyntaxException e) {
                            parserContext.getReaderContext().error(
                                    "'value' attribute doesn't represent a valid URI.", frameElt, e);
                        }
                    } else {
View Full Code Here


public class StaticAllowFromStrategyTests {

    @Test
    public void shouldReturnUri() {
        String uri = "http://www.test.com";
        StaticAllowFromStrategy strategy = new StaticAllowFromStrategy(URI.create(uri));
        assertEquals(uri, strategy.getAllowFromValue(new MockHttpServletRequest()));
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.web.header.writers.frameoptions.StaticAllowFromStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.