id.setName(username);
id.setNameQualifier(password);
id.setFormat(SAMLNameIdentifier.FORMAT_UNSPECIFIED);
SAMLSubject subject = new SAMLSubject();
subject.setNameIdentifier(id);
SAMLAuthenticationQuery query = new SAMLAuthenticationQuery(subject,
SAMLAuthenticationStatement.AuthenticationMethod_Password);
SAMLRequest authRequest = new SAMLRequest(query);
request = authRequest.toString();