Package org.springframework.session

Examples of org.springframework.session.Session


        toSaveContext.setAuthentication(toSaveToken);
        toSave.setAttribute("SPRING_SECURITY_CONTEXT", toSaveContext);

        repository.save(toSave);

        Session session = repository.getSession(toSave.getId());

        assertThat(session.getId()).isEqualTo(toSave.getId());
        assertThat(session.getAttributeNames()).isEqualTo(session.getAttributeNames());
        assertThat(session.getAttribute("a")).isEqualTo(toSave.getAttribute("a"));

        repository.delete(toSave.getId());

        assertThat(repository.getSession(toSave.getId())).isNull();
    }
View Full Code Here


        toSave.setAttribute("1", "2");

        repository.save(toSave);
        toSave = repository.getSession(toSave.getId());

        Session session = repository.getSession(toSave.getId());
        assertThat(session.getAttributeNames().size()).isEqualTo(2);
        assertThat(session.getAttribute("a")).isEqualTo("b");
        assertThat(session.getAttribute("1")).isEqualTo("2");
    }
View Full Code Here

TOP

Related Classes of org.springframework.session.Session

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.