Package org.springframework.security.config.util

Examples of org.springframework.security.config.util.InMemoryXmlApplicationContext


        target.makeUpperCase("test");

    }

    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext(context);
    }
View Full Code Here


        getProvider().authenticate(bob);
    }

    @Test
    public void externalUserServiceRefWorks() throws Exception {
        appContext = new InMemoryXmlApplicationContext(
                "    <authentication-manager>" +
                "        <authentication-provider user-service-ref='myUserService' />" +
                "    </authentication-manager>" +
                "    <user-service id='myUserService'>" +
                "       <user name='bob' password='bobspassword' authorities='ROLE_A' />" +
View Full Code Here

        getProvider().authenticate(bob);
    }

    @Test(expected=BeanDefinitionParsingException.class)
    public void bCryptAndSaltSourceRaisesException() throws Exception {
        appContext = new InMemoryXmlApplicationContext("" +
                " <authentication-manager>" +
                "    <authentication-provider>" +
                "        <password-encoder hash='bcrypt'>" +
                "            <salt-source ref='saltSource'/>" +
                "        </password-encoder>" +
View Full Code Here

        getProvider().authenticate(bob);
    }

    @Test
    public void externalUserServicePasswordEncoderAndSaltSourceWork() throws Exception {
        appContext = new InMemoryXmlApplicationContext(
                "    <authentication-manager>" +
                "      <authentication-provider user-service-ref='customUserService'>" +
                "        <password-encoder ref='customPasswordEncoder'>" +
                "            <salt-source ref='saltSource'/>" +
                "        </password-encoder>" +
View Full Code Here

    }

    // SEC-1466
    @Test(expected=BeanDefinitionParsingException.class)
    public void exernalProviderDoesNotSupportChildElements() throws Exception {
        appContext = new InMemoryXmlApplicationContext(
                "    <authentication-manager>" +
                "      <authentication-provider ref='aProvider'> " +
                "        <password-encoder ref='customPasswordEncoder'/>" +
                "      </authentication-provider>" +
                "    </authentication-manager>" +
View Full Code Here

        return providers.get(0);
    }

    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext("<authentication-manager>" + context + "</authentication-manager>");
    }
View Full Code Here

            this.authenticationManager = applicationContext.getBean(beanName,AuthenticationManager.class);
        }
    }

    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext(context);
    }
View Full Code Here

    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext(context);
    }

    private void setContext(String context, ApplicationContext parent) {
        appContext = new InMemoryXmlApplicationContext(context, parent);
    }
View Full Code Here

        assertTrue(AuthorityUtils.authorityListToSet(rod.getAuthorities()).contains("PREFIX_ROLE_SUPERVISOR"));
    }


    private void setContext(String context) {
        appContext = new InMemoryXmlApplicationContext(context);
    }
View Full Code Here

        Service service = context.getBean(Service.class);
        service.save(new User());
    }

    private void loadContext(String context) {
        this.context = new InMemoryXmlApplicationContext(context);
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.config.util.InMemoryXmlApplicationContext

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.