private static org.opensaml.saml.saml1.core.Subject getSaml1Subject(SamlAssertionWrapper assertionW) { for (Statement stmt : assertionW.getSaml1().getStatements()) { org.opensaml.saml.saml1.core.Subject samlSubject = null; if (stmt instanceof AttributeStatement) { AttributeStatement attrStmt = (AttributeStatement) stmt; samlSubject = attrStmt.getSubject(); } else if (stmt instanceof AuthenticationStatement) { AuthenticationStatement authStmt = (AuthenticationStatement) stmt; samlSubject = authStmt.getSubject(); } else { AuthorizationDecisionStatement authzStmt = (AuthorizationDecisionStatement)stmt; samlSubject = authzStmt.getSubject(); } if (samlSubject != null) { return samlSubject; } } return null; }
private static org.opensaml.saml.saml1.core.Subject getSaml1Subject(SamlAssertionWrapper assertionW) { for (Statement stmt : assertionW.getSaml1().getStatements()) { org.opensaml.saml.saml1.core.Subject samlSubject = null; if (stmt instanceof AttributeStatement) { AttributeStatement attrStmt = (AttributeStatement) stmt; samlSubject = attrStmt.getSubject(); } else if (stmt instanceof AuthenticationStatement) { AuthenticationStatement authStmt = (AuthenticationStatement) stmt; samlSubject = authStmt.getSubject(); } else { AuthorizationDecisionStatement authzStmt = (AuthorizationDecisionStatement)stmt; samlSubject = authzStmt.getSubject(); } if (samlSubject != null) { return samlSubject; } } return null; }
if (statement.getSubject() != null && statement.getSubject().getNameIdentifier() != null) { return statement.getSubject().getNameIdentifier().getFormat();
if (statement.getSubject() != null && statement.getSubject().getNameIdentifier() != null) { return statement.getSubject().getNameIdentifier().getValue();
AuthorizationDecisionStatement authzStmt = (AuthorizationDecisionStatement)stmt; samlSubject = authzStmt.getSubject();
org.opensaml.saml.saml1.core.AuthorizationDecisionStatement authzStmt = (org.opensaml.saml.saml1.core.AuthorizationDecisionStatement)stmt; samlSubject = authzStmt.getSubject();