Package org.springframework.security.authentication.dao

Examples of org.springframework.security.authentication.dao.SystemWideSaltSource


    public final void setUp() throws Exception {
        super.setUp();
    }

    public void testDetectsMissingSystemWideSalt() throws Exception {
        SystemWideSaltSource saltSource = new SystemWideSaltSource();

        try {
            saltSource.afterPropertiesSet();
            fail("Should have thrown IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
            assertEquals("A systemWideSalt must be set", expected.getMessage());
        }
    }
View Full Code Here


            assertEquals("A systemWideSalt must be set", expected.getMessage());
        }
    }

    public void testGettersSetters() {
        SystemWideSaltSource saltSource = new SystemWideSaltSource();
        saltSource.setSystemWideSalt("helloWorld");
        assertEquals("helloWorld", saltSource.getSystemWideSalt());
    }
View Full Code Here

        saltSource.setSystemWideSalt("helloWorld");
        assertEquals("helloWorld", saltSource.getSystemWideSalt());
    }

    public void testNormalOperation() throws Exception {
        SystemWideSaltSource saltSource = new SystemWideSaltSource();
        saltSource.setSystemWideSalt("helloWorld");
        saltSource.afterPropertiesSet();
        assertEquals("helloWorld", saltSource.getSalt(null));
    }
View Full Code Here

    }

    // SEC-2173
    public void testToString() {
        String systemWideSalt = "helloWorld";
        SystemWideSaltSource saltSource = new SystemWideSaltSource();
        saltSource.setSystemWideSalt(systemWideSalt);
        assertThat(saltSource.toString()).isEqualTo(systemWideSalt);
    }
View Full Code Here

TOP

Related Classes of org.springframework.security.authentication.dao.SystemWideSaltSource

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.