public function logout()
    {

        // load the authentication manager and try to authenticate this request
        /** @var \AppserverIo\Psr\Auth\AuthenticationManagerInterface $authenticationManager */
        if ($authenticationManager = $this->getAuthenticationManager()) {
            // try to load the authentication managers default authenticator
            if (($authenticator = $authenticationManager->getAuthenticator()) == null) {
                throw new ServletException('Can\'t find default authenticator');
            }

            // logout the actual user
            $authenticator->logout($this);
        }
    }
public function logout()
    {

        // load the authentication manager and try to authenticate this request
        /** @var \AppserverIo\Psr\Auth\AuthenticationManagerInterface $authenticationManager */
        if ($authenticationManager = $this->getAuthenticationManager()) {
            // try to load the authentication managers default authenticator
            if (($authenticator = $authenticationManager->getAuthenticator()) == null) {
                throw new ServletException('Can\'t find default authenticator');
            }

            // logout the actual user
            $authenticator->logout($this);
        }
    }
public function logout ( ) { // load the authentication manager and try to authenticate this request /** @var \AppserverIo\Psr\Auth\AuthenticationManagerInterface $authenticationManager */ if ( $ authenticationManager = $ this -> getAuthenticationManager ( ) ) { // try to load the authentication managers default authenticator if ( ( $ authenticator = $ authenticationManager -> getAuthenticator ( ) ) == null ) { throw new ServletException ( 'Can\'t find default authenticator' ) ; } // logout the actual user $ authenticator -> logout ( $ this ) ; } }
Establish null as the value returned when getUserPrincipal, getRemoteUser, and getAuthType is
called on the request.

@return void
@throws \AppserverIo\Psr\Servlet\ServletException Is thrown if no default authenticator can be found
Establish null as the value returned when getUserPrincipal getRemoteUser and getAuthType is called on the request .