code: @Override
      public <T extends Principal> Set<T> getPrincipalsByType(Class<T> type) {
          //Get the caller principal from the caller subject
          Subject callerSubject = getCallerSubject();
  
          if (callerSubject != null) {
              //Get the prinicipals by type
              Set<T> principals = callerSubject.getPrincipals(type);
              return principals;
          }
  
          return null;
  
      }
docs: /*
  (non-Javadoc)
  
  @see javax.security.enterprise.SecurityContext#getPrincipalsByType(java.lang.Class)