id.setFormat(SAMLNameIdentifier.FORMAT_UNSPECIFIED);
SAMLSubject subject = new SAMLSubject();
subject.setNameIdentifier(id);
String methodStr = SAMLAuthenticationStatement.AuthenticationMethod_Password;
SAMLAuthenticationStatement authStatement = new SAMLAuthenticationStatement();
authStatement.setAuthMethod(methodStr);
authStatement.setSubject(subject);
authStatement.setAuthInstant(new Date());
//create an assertion
SAMLAssertion authAssertion = new SAMLAssertion();
authAssertion.setId(this.idProvider.getIdentifier());
authAssertion.setIssuer(assertingParty);