public function logout()
    {

        // load the user identity and the subject's principals
        $identity = $this->getIdentity();
        $principals = $this->subject->getPrincipals();

        // remove the user identity from the subject
        foreach ($principals as $key => $principal) {
            if ($identity->equals($principal)) {
                $principals->remove($key);
            }
        }

        // return TRUE on success
        return true;
    }
public function logout()
    {

        // load the user identity and the subject's principals
        $identity = $this->getIdentity();
        $principals = $this->subject->getPrincipals();

        // remove the user identity from the subject
        foreach ($principals as $key => $principal) {
            if ($identity->equals($principal)) {
                $principals->remove($key);
            }
        }

        // return TRUE on success
        return true;
    }
public function logout ( ) { // load the user identity and the subject's principals $ identity = $ this -> getIdentity ( ) ; $ principals = $ this -> subject -> getPrincipals ( ) ; // remove the user identity from the subject foreach ( $ principals as $ key => $ principal ) { if ( $ identity -> equals ( $ principal ) ) { $ principals -> remove ( $ key ) ; } } // return TRUE on success return true ; }
Remove the user identity and roles added to the Subject during commit.

@return boolean Always TRUE
@throws \AppserverIo\Psr\Security\Auth\Login\LoginException Is thrown if an error during login occured
Remove the user identity and roles added to the Subject during commit .