code: public static String getName() {
          String secname = null;
          WSCredential credential = getCallerWSCredential();
          try {
              if (credential != null && !credential.isUnauthenticated()) {
                  String realmSecname = credential.getRealmSecurityName();
                  if (realmSecname != null && !realmSecname.isEmpty()) {
                      secname = realmSecname.substring(realmSecname.lastIndexOf(REALM_SEPARATOR) + 1);
                  }
              }
          } catch (Exception e) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "Internal error: " + e);
          }
          return secname;
      }
docs: Return the security name of the current subject on the thread
  
  @return the security name id, or null if there is no subject or no WSCredential