Package com.salas.bb.utils.net.auth

Examples of com.salas.bb.utils.net.auth.IPasswordsRepository.record()


        PasswordAuthentication auth;

        auth = repository.getAuthInformation(SAMPLE_CONTEXT_A);
        assertNull("Database has no record about this context.", auth);

        repository.record(SAMPLE_CONTEXT_A, SAMPLE_AUTH_INFO);
        auth = repository.getAuthInformation(SAMPLE_CONTEXT_A);
        assertTrue("Database has record about this context.",
            Arrays.equals(SAMPLE_PASSWORD, auth.getPassword()));
        assertEquals("Database has record about this context.",
            SAMPLE_USERNAME, auth.getUserName());
View Full Code Here


     */
    public void testForget()
    {
        IPasswordsRepository repository = initModernDatabase();

        repository.record(SAMPLE_CONTEXT_A, SAMPLE_AUTH_INFO);
        repository.record(SAMPLE_CONTEXT_B, SAMPLE_AUTH_INFO);
        repository.forget(SAMPLE_CONTEXT_A);

        PasswordAuthentication auth = repository.getAuthInformation(SAMPLE_CONTEXT_A);
        assertNull("Database should forget about the context.", auth);
View Full Code Here

    public void testForget()
    {
        IPasswordsRepository repository = initModernDatabase();

        repository.record(SAMPLE_CONTEXT_A, SAMPLE_AUTH_INFO);
        repository.record(SAMPLE_CONTEXT_B, SAMPLE_AUTH_INFO);
        repository.forget(SAMPLE_CONTEXT_A);

        PasswordAuthentication auth = repository.getAuthInformation(SAMPLE_CONTEXT_A);
        assertNull("Database should forget about the context.", auth);
View Full Code Here

     */
    public void testForgetAll()
    {
        IPasswordsRepository repository = initModernDatabase();

        repository.record(SAMPLE_CONTEXT_A, SAMPLE_AUTH_INFO);
        repository.record(SAMPLE_CONTEXT_B, SAMPLE_AUTH_INFO);
        repository.forgetAll();

        PasswordAuthentication auth = repository.getAuthInformation(SAMPLE_CONTEXT_A);
        assertNull("Database should forget the context password.", auth);
View Full Code Here

    public void testForgetAll()
    {
        IPasswordsRepository repository = initModernDatabase();

        repository.record(SAMPLE_CONTEXT_A, SAMPLE_AUTH_INFO);
        repository.record(SAMPLE_CONTEXT_B, SAMPLE_AUTH_INFO);
        repository.forgetAll();

        PasswordAuthentication auth = repository.getAuthInformation(SAMPLE_CONTEXT_A);
        assertNull("Database should forget the context password.", auth);
        auth = repository.getAuthInformation(SAMPLE_CONTEXT_B);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.