code: protected Subject createPartialSubject(String username, AuthenticationService authenticationService, String customCacheKey) {
          Subject partialSubject = null;
          partialSubject = new Subject();
          Hashtable<String, Object> hashtable = new Hashtable<String, Object>();
          hashtable.put(AttributeNameConstants.WSCREDENTIAL_USERID, username);
          // only set the property in the hashtable if the public property is not already set;
          // this property allows authentication when only the username is supplied
          if (!authenticationService.isAllowHashTableLoginWithIdOnly()) {
              hashtable.put(AuthenticationConstants.INTERNAL_ASSERTION_KEY, Boolean.TRUE);
          }
  
          if (customCacheKey != null) {
              hashtable.put(AttributeNameConstants.WSCREDENTIAL_CACHE_KEY, customCacheKey);
          }
  
          partialSubject.getPublicCredentials().add(hashtable);
  
          return partialSubject;
      }
docs: /*
  Create the partial subject that can be used to authenticate the user with.