Refreshes the current session manually using password.

@param username the username
@param password the password
@param characterSelector the character selector
@throws AuthenticationException If an exception occurs during the
authentication
12394
public synchronized void refreshWithPassword(String username, String password, CharacterSelector characterSelector) throws AuthenticationException {
		refreshWithPassword(createPasswordProvider(username, password, characterSelector));
	}
774093
@Override
    public void deleteUser(String username) throws AuthenticationException {
        String user = file_store.getProperty(username);
        if (user == null) {
            throw new AuthenticationException("User '" + username
                    + "' not found.");
        }
        file_store.remove(username);
        try {
            saveUsers();
        } catch (IOException e) {
            throw new AuthenticationException("Error deleting user: ", e);
        }
    }
1316055
public void authenticate(String username, String password) {
        ldapTemplate.authenticate(query().where("objectClass").is("simpleSecurityObject").and("cn").is(username), password);
        LOGGER.info("Successfully authenticated " + username);
    }
568300
public login login(String username, String password) throws Exception
	{
		this.set_credential(username, password);
		return this.login();
	}
468764
@Override
    public void setUserName(String userName) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setUserName", userName);
        jcaManagedConnectionFactory.setUserName(userName);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setUserName");
    }
1261245
public void setPassword(CharSequence password) {

        LettuceAssert.notNull(password, "Password must not be null");
        this.password = password.toString().toCharArray();
    }
1171720
public Login login(String username, String password) throws Exception {
    return login(username, password, null);
  }
816232
public void setCredential(String username, String password) {
	if (username != null) {
	    env.put("java.naming.security.principal", username);
	    env.put("java.naming.security.credentials", password);
	}
	else {
	    env.remove("java.naming.security.principal");
	    env.remove("java.naming.security.credentials");
	}
    }
1197142
public T authentication(String username, String password, boolean allowAnyHost) {
        if (StringUtils.isNotBlank(username)) {
            if (defaultHost == null || StringUtils.isBlank(defaultHost.getHostName())) {
                throw new IllegalStateException("Cannot configure authentication when host is not set.");
            }
            AuthScope authscope = allowAnyHost ?
                    new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM) :
                    new AuthScope(defaultHost.getHostName(), AuthScope.ANY_PORT, AuthScope.ANY_REALM);
            credsProvider.setCredentials(authscope, new UsernamePasswordCredentials(username, password));
        }
        return self();
    }
497863
public void setUserPassword(String userName, String password) {

        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.SetUserPassword);
        byte[] secret = null;
        if(password != null && ! password.isEmpty()){
            secret = ObfuscatUtil.base64Encode(password.getBytes());
        }
        SetUserPasswordProtocol p = new SetUserPasswordProtocol(userName, secret);

        connection.submitRequest(header, p, null);

    }
1254943
public void setDirectoryUser(String userName, String password){
        this.authData = generateDirectoryAuthData(userName, password);
        if(getStatus().isConnected()){
            ErrorCode ec = sendConnectProtocol(this.getConnectTimeOut());
            if(ErrorCode.SESSION_EXPIRED.equals(ec)){
                LOGGER.info("Session Expired, cleanup the client session.");
                closeSession();
            } else if(! ErrorCode.OK.equals(ec)){
                reopenSession();
            }
        }
    }
192468
private void configureAuthentication(String username, String password, String realm) {

        // If the username is set, set up authentication:
        if (StringUtils.isNotBlank(username)) {

            this.username = username;
            this.password = password;
            this.realm = StringUtils.defaultIfBlank(realm, "restolino");

            authenticationEnabled = true;
        }
    }
1295887
public AuthenticationConfigurationBuilder password(String password) {
      this.password = password != null ? password.toCharArray() : null;
      return enable();
   }
1189972
private void validateInput(AuthenticationService authenticationService, String username) throws AuthenticationException {
        if (authenticationService == null) {
            throw new AuthenticationException("authenticationService cannot be null.");
        } else if (username == null) {
            throw new AuthenticationException("username cannot be null.");
        }
    }
753362
protected final boolean authenticate(Context context, String username, String password, boolean rememberMe) {
        UsernamePasswordToken authenticationToken = new UsernamePasswordToken(username, password, rememberMe);
        try {
            SecurityUtils.getSubject().login(authenticationToken);
            log.info("'{}' authenticated", username);
            return true;
        } catch (AuthenticationException e) {
            log.info("'{}' failed to authenticate", username);
            return false;
        }
    }
1144977
private function _login($username, $password) {
        $data["Envelope"] = array(
            "Body" => array(
                "Login" => array(
                    "USERNAME" => $username,
                    "PASSWORD" => $password,
                ),
            ),
        );
        $response = $this->_request($data);
        $result = $response["Envelope"]["Body"]["RESULT"];
        if ($this->_isSuccess($result)) {
            $this->_jsessionid = $result['SESSIONID'];
            $this->_session_encoding = $result['SESSION_ENCODING'];
            $this->_username = $username;
            $this->_password = $password;
        } else {
            throw new \Exception("Login Error: ".$this->_getErrorFromResponse($response));
        }
    }
1145901
@Override
    public synchronized void refreshCredentials() {
        GetSessionTokenResult sessionTokenResult = securityTokenService
                .getSessionToken(new GetSessionTokenRequest().withDurationSeconds(sessionDurationSeconds));
        sessionCredentials = sessionTokenResult.getCredentials();
    }