public function login()
    {

        // initialize the login state
        $this->loginOk = false;

        // query whether or not we should use the shared state
        if ($this->useFirstPass) {
            $name = $this->sharedState->get(SharedStateKeys::LOGIN_NAME);
            $password = $this->sharedState->get(SharedStateKeys::LOGIN_PASSWORD);

            // if we've a username and a password login has been successful
            if ($name && $password) {
                $this->loginOk = true;
                return true;
            }
        }

        // return FALSE if login has not been successful
        return false;
    }
public function login()
    {

        // initialize the login state
        $this->loginOk = false;

        // query whether or not we should use the shared state
        if ($this->useFirstPass) {
            $name = $this->sharedState->get(SharedStateKeys::LOGIN_NAME);
            $password = $this->sharedState->get(SharedStateKeys::LOGIN_PASSWORD);

            // if we've a username and a password login has been successful
            if ($name && $password) {
                $this->loginOk = true;
                return true;
            }
        }

        // return FALSE if login has not been successful
        return false;
    }
public function login ( ) { // initialize the login state $ this -> loginOk = false ; // query whether or not we should use the shared state if ( $ this -> useFirstPass ) { $ name = $ this -> sharedState -> get ( SharedStateKeys :: LOGIN_NAME ) ; $ password = $ this -> sharedState -> get ( SharedStateKeys :: LOGIN_PASSWORD ) ; // if we've a username and a password login has been successful if ( $ name && $ password ) { $ this -> loginOk = true ; return true ; } } // return FALSE if login has not been successful return false ; }
Looks for servlet_engine.authentication.login_module.login_name and servlet_engine.authentication.login_module.login_password
values in the sharedState map if the useFirstPass option was true and returns TRUE if they exist. If they do not or are NULL
this method returns FALSE.

Note that subclasses that override the login method must set the loginOk var to TRUE if the login succeeds in order for the
commit phase to populate the Subject. This implementation sets loginOk to TRUE if the login() method returns TRUE, otherwise,
it sets loginOk to FALSE. Perform the authentication of username and password.

@return boolean TRUE if the login credentials are available in the sharedMap, else FALSE
@throws \AppserverIo\Psr\Security\Auth\Login\LoginException Is thrown if an error during login occured
Looks for servlet_engine . authentication . login_module . login_name and servlet_engine . authentication . login_module . login_password values in the sharedState map if the useFirstPass option was true and returns TRUE if they exist . If they do not or are NULL this method returns FALSE .