get input securityName.

@param input security attribute defined in the realm.
@param input security name value.
@param loginAccount or Group.

@return uniqueName if the property is an IdentifierType property, principalName otherwise.
189576
protected String getRealInputAttrName(String inputAttrName, String id, boolean isUser) {
        boolean isInputAttrValueDN = UniqueNameHelper.isDN(id) != null;
        boolean isInputAttrIdentifier = isIdentifierTypeProperty(inputAttrName);

        if (!isInputAttrIdentifier && isInputAttrValueDN) {
            // To suppress the below message from coming in trace.log due to defect 94474
            /*
             * if (tc.isWarningEnabled()) {
             * //Tr.warning(tc, "the propertyForInput " + inputAttrName + " doesn't match the format of input value " + id + ", switch to uniqueName");
             * Tr.warning(tc, WIMMessageKey.INVALID_PROPERTY_VALUE_FORMAT, inputAttrName);
             * }
             */
            inputAttrName = "uniqueName";
            //take it as uniqueName because we don't know if it's externalName or uniqueName value
        } else if (isInputAttrIdentifier && !isInputAttrValueDN) {
            // if dealing with LoginAccount or Group
            if (isUser) {
                // To suppress the below message from coming in trace.log due to defect 94474
                /*
                 * if (tc.isWarningEnabled()) {
                 * //Tr.warning(tc, "the propertyForInput " + inputAttrName + " doesn't match the format of input value " + id + ", switch to principalName");
                 * Tr.warning(tc, WIMMessageKey.INVALID_PROPERTY_VALUE_FORMAT, inputAttrName);
                 * }
                 */
                inputAttrName = "principalName"; // loginaccounts
            }
            //OR
            else {
                // To suppress the below message from coming in trace.log due to defect 94474
                /*
                 * if (tc.isWarningEnabled()) {
                 * //Tr.warning(tc, "the propertyForInput " + inputAttrName + " doesn't match the format of input value " + id + ", swith to cn");
                 * Tr.warning(tc, WIMMessageKey.INVALID_PROPERTY_VALUE_FORMAT, inputAttrName);
                 * }
                 */
                inputAttrName = "cn"; // groups
            }
        }
        return inputAttrName;
    }
108941
@Nullable
  @OverrideOnDemand
  protected IUser getUserOfLoginName (@Nullable final String sLoginName)
  {
    return PhotonSecurityManager.getUserMgr ().getUserOfLoginName (sLoginName);
  }
1306174
def _uniquename(self, log):
        '''
        '''
        return '{hostname} - {time}.log'.format(
                                hostname=os.getenv('USERNAME'),
                                time=strftime("%a, %d %b %Y %H-%M-%S", gmtime()))
1282127
public String getClassIdentity(XEvent event) {
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < keys.length; i++) {
			XAttribute attribute = event.getAttributes().get(keys[i]);
//			if (attribute == null) {
//				return null;
//			}
			if (attribute != null) {
				sb.append(attribute.toString().trim());
			}
			if (i < (keys.length - 1)) {
				sb.append("+");
			}
		}
		return sb.toString();
	}
133548
private String getQualifiedMetricName(String metricName) {
    try {
      if (SecurityUtils.isAuthenticationEnabled(mContext.getConf())
          && LoginUser.get(mContext.getConf()) != null) {
        return Metric.getMetricNameWithTags(metricName, CommonMetrics.TAG_USER,
            LoginUser.get(mContext.getConf()).getName());
      } else {
        return metricName;
      }
    } catch (IOException e) {
      return metricName;
    }
  }
1300935
@Override
    public String getUsernameFromQuery(final Map<String, List<Object>> query) {
        final List<Object> usernameAttributeValues = query.get(this.usernameAttribute);

        if (usernameAttributeValues == null || usernameAttributeValues.size() == 0) {
            return null;
        }

        final Object firstValue = usernameAttributeValues.get(0);
        if (firstValue == null) {
            return null;
        }

        final String username = StringUtils.trimToNull(String.valueOf(firstValue));
        if (username == null || username.contains(IPersonAttributeDao.WILDCARD)) {
            return null;
        }

        return username;
    }
1197972
public String getIdName() {
        String result = null;
        if (idAccessor != null) {
            result = idAccessor.getPropertyName();
        }
        return result;
    }
767164
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;
    }
631610
@Override
    public String getName () {
        boolean d = this.domain != null && this.domain.length() > 0;
        return d ? this.domain + "\\" + this.username : this.username;
    }
977315
protected String encryptResolvedUsername(final Principal principal, final Service service, final RegisteredService registeredService, final String username) {
        val applicationContext = ApplicationContextProvider.getApplicationContext();
        val cipher = applicationContext.getBean("registeredServiceCipherExecutor", RegisteredServiceCipherExecutor.class);
        return cipher.encode(username, Optional.of(registeredService));
    }
1063189
@Override
    public String getUserName() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getUserName");
        String userName = jcaConnectionFactory.getUserName();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getUserName", userName);
        return userName;
    }
198534
public static String getInputValueName(
            @Nullable final String inputPrefix,
            @Nonnull final BiMap<String, String> inputMapper,
            @Nonnull final String field) {
        String name = inputMapper == null ? null : inputMapper.inverse().get(field);
        if (name == null) {
            if (inputMapper != null && inputMapper.containsKey(field)) {
                throw new RuntimeException("field in keys");
            }
            final String[] defaultValues = {
                    Values.TASK_DIRECTORY_KEY, Values.CLIENT_HTTP_REQUEST_FACTORY_KEY,
                    Values.TEMPLATE_KEY, Values.PDF_CONFIG_KEY, Values.SUBREPORT_DIR_KEY,
                    Values.OUTPUT_FORMAT_KEY, Values.JOB_ID_KEY
            };
            if (inputPrefix == null || Arrays.asList(defaultValues).contains(field)) {
                name = field;
            } else {
                name = inputPrefix.trim() +
                        Character.toUpperCase(field.charAt(0)) +
                        field.substring(1);
            }
        }
        return name;
    }
1185918
private String getUserAccessId(String userName) {

        try {
            SecurityService securityService = securityServiceRef.getService();
            UserRegistryService userRegistryService = securityService.getUserRegistryService();
            UserRegistry userRegistry = userRegistryService.getUserRegistry();
            String realm = userRegistry.getRealm();
            String uniqueId = userRegistry.getUniqueUserId(userName);
            return AccessIdUtil.createAccessId(AccessIdUtil.TYPE_USER, realm, uniqueId);
        } catch (EntryNotFoundException e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Caught exception getting the access id for "
                             + userName + ": " + e);
            }
        } catch (RegistryException e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Caught exception getting the access id for "
                             + userName + ": " + e);
            }
        }
        return null;
    }
988484
@Nullable
  @OverrideOnDemand
  protected String getLoginName (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope)
  {
    return aRequestScope.params ().getAsString (CLogin.REQUEST_ATTR_USERID);
  }
859932
@Nonnull
  public ELoginResult loginUser (@Nullable final String sLoginName, @Nullable final String sPlainTextPassword)
  {
    return loginUser (sLoginName, sPlainTextPassword, (Iterable <String>) null);
  }
1298870
public OvhInput serviceName_input_inputId_GET(String serviceName, String inputId) throws IOException {
		String qPath = "/dbaas/logs/{serviceName}/input/{inputId}";
		StringBuilder sb = path(qPath, serviceName, inputId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhInput.class);
	}
1087554
public String login(Authentication authentication) {
		String token = getToken();
		return login(token, authentication);
	}