code: protected PrincipalSelection getPrincipalSelection(ProfileRequestContext<?, ?> context) {
      final AuthnRequest authnRequest = this.getAuthnRequest(context);
      if (authnRequest != null && authnRequest.getExtensions() != null) {
        return authnRequest.getExtensions()
          .getUnknownXMLObjects()
          .stream()
          .filter(PrincipalSelection.class::isInstance)
          .map(PrincipalSelection.class::cast)
          .findFirst()
          .orElse(null);
      }
      return null;
    }
docs: Utility method that may be used to obtain the {@link PrincipalSelection} extension that may be received in an
  {@code AuthnRequest}.
  
  @param context
  the profile context
  @return the {@code PrincipalSelection} extension, or {@code null} if none is found in the current
  {@code AuthnRequest}