Hello all,
 
Can I use in one thread tests subject login/logout. Something like this:
 
    @BeforeAll
    protected void doBeforeAll() {
        Subject subject = SecurityUtils.getSubject();
        subject.login(token);
    }
    @AfterAll
    protected void doAfterAll() {
        Subject subject = SecurityUtils.getSubject();
        subject.logout();
    }
 
As I understand, subject.login() does thread binding, and subject.logout() does 
thread unbinding. So, could anyone say
if this code is correct.
 
--
Best regards, Alex Orlov

Reply via email to