public Set<Principal> parseRolesFromAssertion(
Principal principal, Subject subject, SamlAssertionWrapper assertion
) {
if (subject != null && useJaasSubject) {
if (roleClassifier != null && !"".equals(roleClassifier)) {
RolePrefixSecurityContextImpl securityContext =
new RolePrefixSecurityContextImpl(subject, roleClassifier, roleClassifierType);
return securityContext.getUserRoles();
} else {
return new DefaultSecurityContext(principal, subject).getUserRoles();
}
}