Get the access ID from the specified credential.

@parm cred the WSCredential to search
@return the user access id of the credential, or null when the
cred is expired or destroyed
485770
private String getAccessId(WSCredential cred) {
        String accessId = null;
        try {
            accessId = cred.getAccessId();
        } catch (CredentialExpiredException e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Caught exception getting the access id: " + e);
            }
        } catch (CredentialDestroyedException e) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Caught exception getting the access id: " + e);
            }
        }
        // TODO if ignoreCase is Collection, then lower case the accessid
        return accessId;
    }
1179858
public String getId() {
        if (id == null) {
            synchronized (this) {
                if (id == null) {
                    id = "rpc-cfg-" + ID_GENERATOR.getAndIncrement();
                }
            }
        }
        return id;
    }
1067192
public Credential getCredentialFromMetadataServiceAccount()
      throws IOException, GeneralSecurityException {
    logger.atFine().log("getCredentialFromMetadataServiceAccount()");
    Credential cred =
        new ComputeCredentialWithRetry(
            new ComputeCredential.Builder(getStaticHttpTransport(), JSON_FACTORY)
                .setRequestInitializer(new CredentialHttpRetryInitializer()));
    try {
      cred.refreshToken();
    } catch (IOException e) {
      throw new IOException(
          "Error getting access token from metadata server at: " + cred.getTokenServerEncodedUrl(),
          e);
    }
    return cred;
  }
806204
def get_access_id(self):
        
        access_id = self.get_as_nullable_string("access_id")
        access_id = access_id if access_id != None else self.get_as_nullable_string("client_id")
        return access_id
150364
public CredVal getUserPassImpl() {
		for(Lur lur : lurs) {
			if(lur instanceof CredVal) {
				return (CredVal)lur;
			}
		}
		return null;
	}
730447
private CredentialEntry getCredentialEntry(CredentialProvider provider,
	                                           String name) throws IOException {
		CredentialEntry entry = provider.getCredentialEntry(name);
		if (entry != null) {
			return entry;
		}

		// The old name is stored in the credential provider.
		String oldName = getDeprecatedKey(name);
		if (oldName != null) {
			entry = provider.getCredentialEntry(oldName);
			if (entry != null) {
				logDeprecationOnce(oldName, provider.toString());
				return entry;
			}
		}

		// The name is deprecated.
		DeprecatedKeyInfo keyInfo = getDeprecatedKeyInfo(name);
		if (keyInfo != null && keyInfo.newKeys != null) {
			for (String newName : keyInfo.newKeys) {
				entry = provider.getCredentialEntry(newName);
				if (entry != null) {
					logDeprecationOnce(name, null);
					return entry;
				}
			}
		}

		return null;
	}
687574
private UsernamePasswordCredentials getCredentialsById(String credentialsId, Run<?, ?> run, PrintStream logger) {
    	if (StringUtils.isBlank(credentialsId)) {
    		throw new NullPointerException("credentials is not configured.");
    	}
    	
    	UsernamePasswordCredentials credentials = CredentialsProvider.findCredentialById(credentialsId,
        		StandardUsernamePasswordCredentials.class,
        		run,
    			URIRequirementBuilder.create().build());
    	
    	if (credentials == null) {
    		logger.println("Can not find credentials with the credentialsId:" + credentialsId);
    	}
    	return credentials;
    }
540365
protected Credential collectCredential(DataBinder parameters) throws NoSuchAlgorithmException, UnsupportedEncodingException {
        // allow clients to use either <IdentityName> or USERNAME; if both are present <IdentityName> takes precedence
_logger.log(Level.FINE, "looking for {0} in data binder", IdentityName);
        String id = null;
        if ((id = parameters.get(IdentityName)) != null && id.length() > 0) {
            parameters.put(USERNAME, id);
        } else if ((id = parameters.get(USERNAME)) != null && id.length() > 0) {
            parameters.put(IdentityName, id);
        } else {
            return null;
        }
_logger.log(Level.FINE, "got identity = {0}", id);

        String password = parameters.remove(PASSWORD);
_logger.log(Level.FINE, "got password = {0}", password);
        if (password != null && password.length() > 0) {
            return new Credential(id, Strings.hash(password));
        } else {
            return null;
        }
	}
1044683
private String getExistingOriginAccessId() {
        List<CloudFrontOriginAccessIdentitySummary> oaiList =
            cfClient.listCloudFrontOriginAccessIdentities(
                new ListCloudFrontOriginAccessIdentitiesRequest())
                    .getCloudFrontOriginAccessIdentityList().getItems();
        if (oaiList != null && oaiList.size() > 0) {
            return oaiList.iterator().next().getId();
        }
        return null;
    }
165113
@Override
    public String getAWSAccessId() {
        String aWSAccessId = configInstance.getStringProperty(
                namespace + "awsAccessId", null).get();

        if (null != aWSAccessId) {
            return aWSAccessId.trim();
        } else {
            return null;
        }

    }
1304195
public static GSSCredential getCredential(Subject subject) {
	if (subject == null) {
	    return null;
	}
	Set gssCreds = subject.getPrivateCredentials(GSSCredential.class);
	if (gssCreds == null) {
	    return null;
	}
	Iterator iter = gssCreds.iterator();
	return (iter.hasNext()) ?
	    (GSSCredential)iter.next() :
	    null;
    }
1175934
private AccessToken getAccessToken() throws IOException {
    // synchronize attempts to refresh the accessToken
    synchronized (credentials) {
      if (needsRefresh(credentials.getAccessToken())) {
        credentialRefresher.refresh(credentials);
      }
    }
    return credentials.getAccessToken();
  }
1009189
public String getAccessId() {
		String accessId = getAsNullableString("access_id");
		accessId = accessId != null ? accessId : getAsNullableString("client_id");
		return accessId;
	}
843153
@JsonIgnore
	public Map<String, String> getCredentials() {
		if (getId() == null) {
			return Collections.emptyMap();
		} else {
			Map<String, String> keys = new LinkedHashMap<String, String>(2);
			keys.put("accessKey", getId());
			keys.put("secretKey", getSecret());
			return keys;
		}
	}
188634
@Override
  @CheckForNull
  public String getId() {
    return config.get(CoreProperties.SERVER_ID).orElse(null);
  }
1013181
public static String getCurrentId()
  {
    SystemManager system = getCurrent();

    if (system == null) {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();

      throw new IllegalStateException(L.l("{0} is not available in this context.\n  {1}",
                                          SystemManager.class.getSimpleName(),
                                          loader));
    }

    return system.getId();
  }
364810
private String getOwnerId() {
        APITrace.begin(this, "AWSCloud.getOwnerId");
        try {
            ProviderContext ctx = getContext();

            if( ctx == null ) {
                return null;
            }
            Map<String, String> parameters = getStandardParameters(getContext(), EC2Method.DESCRIBE_SECURITY_GROUPS);
            EC2Method method;
            NodeList blocks;
            Document doc;

            method = new EC2Method(EC2Method.SERVICE_ID, this, parameters);
            try {
                doc = method.invoke();
            } catch( EC2Exception e ) {
                logger.error(e.getSummary());
                throw new CloudException(e);
            }
            blocks = doc.getElementsByTagName("securityGroupInfo");
            for( int i = 0; i < blocks.getLength(); i++ ) {
                NodeList items = blocks.item(i).getChildNodes();

                for( int j = 0; j < items.getLength(); j++ ) {
                    Node item = items.item(j);

                    if( item.getNodeName().equals("item") ) {
                        NodeList attrs = item.getChildNodes();
                        for( int k = 0; k < attrs.getLength(); k++ ) {
                            Node attr = attrs.item(k);
                            if( attr.getNodeName().equals("ownerId") ) {
                                return attr.getFirstChild().getNodeValue().trim();
                            }
                        }
                    }
                }
            }
            return null;
        } catch( InternalException e ) {
        } catch( CloudException e ) {
        } finally {
            APITrace.end();
        }
        // Couldn't get the number for some reason
        return null;
    }