Refactoring SAMLUserDetailsImpl to make group parsing generic