+ this.issueLength));
final SAMLAudienceRestrictionCondition samlAudienceRestrictionCondition = new SAMLAudienceRestrictionCondition();
samlAudienceRestrictionCondition.addAudience(service.getId());
final SAMLAuthenticationStatement samlAuthenticationStatement = new SAMLAuthenticationStatement();
samlAuthenticationStatement.setAuthInstant(authentication
.getAuthenticatedDate());
samlAuthenticationStatement
.setAuthMethod(authenticationMethod != null
? authenticationMethod
: SAMLAuthenticationStatement.AuthenticationMethod_Unspecified);
samlAuthenticationStatement
.setSubject(getSamlSubject(authentication));
if (!authentication.getPrincipal().getAttributes().isEmpty()) {
final SAMLAttributeStatement attributeStatement = new SAMLAttributeStatement();