private AuthenticationStatement newAuthenticationStatement(final Authentication authentication) { final String authenticationMethod = (String) authentication.getAttributes().get( SamlAuthenticationMetaDataPopulator.ATTRIBUTE_AUTHENTICATION_METHOD); final AuthenticationStatement authnStatement = newSamlObject(AuthenticationStatement.class); authnStatement.setAuthenticationInstant(new DateTime(authentication.getAuthenticatedDate())); authnStatement.setAuthenticationMethod(authenticationMethod != null ? authenticationMethod : SamlAuthenticationMetaDataPopulator.AUTHN_METHOD_UNSPECIFIED); authnStatement.setSubject(newSubject(authentication.getPrincipal().getId())); return authnStatement; }
Subject authSubject = SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject()); authenticationStatement.setSubject(authSubject);
Subject authSubject = SAML1ComponentBuilder.createSaml1v1Subject(statementBean.getSubject()); authenticationStatement.setSubject(authSubject);
= (AuthenticationStatement)CommonUtil.buildXMLObject(AuthenticationStatement.DEFAULT_ELEMENT_NAME); authenticationStatement.setSubject(subject); authenticationStatement.setAuthenticationMethod(authenticationMethod); authenticationStatement.setAuthenticationInstant(authenticationInstant);