docs: private String getCallerUniqueName() throws WIMApplicationException {
          String uniqueName = null;
          Subject subject = null;
          WSCredential cred = null;
  
          try {
              /* Get the subject */
              if ((subject = WSSubject.getRunAsSubject()) == null) {
                  subject = WSSubject.getCallerSubject();
              }
  
              /* Get the credential */
              if (subject != null) {
                  Iterator<WSCredential> iter = subject.getPublicCredentials(WSCredential.class).iterator();
                  if (iter.hasNext()) {
                      cred = iter.next();
                  }
                  //check if credentials is null , then throw exception
                  if (null == cred) {
                      throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE));
                  }
              }
              //throw exception when subject is null
              else {
                  throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_FAILURE));
              }
  
              /* Get the unique name */
              uniqueName = cred.getUniqueSecurityName();
              if (null == uniqueName) {
                  throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE));
              }
          } //throw exception in case there is some issue while retrieving authentication details from subject
          catch (Exception excp) {
              //check if Auth subject failure OR auth credential failure to give relevant message in exception
              if (WIMMessageKey.AUTH_SUBJECT_FAILURE.equals(excp.getMessage())) {
                  throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_FAILURE));
              } else {
                  throw new WIMApplicationException(WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE, Tr.formatMessage(tc, WIMMessageKey.AUTH_SUBJECT_CRED_FAILURE));
              }
          }
  
          //return unique name obtained from subject
          return uniqueName;
      }