agave-systems/systems-core/src/main/java/org/iplantc/service/systems/model/CredentialServer.java
/**
	 * Retrieves a new credential using the the current protocol and supplied
	 * username and password.
	 * 
	 * @param username
	 * @param password
	 * @return Object a credential. Generally this will be a GSSCredential until we support other protocols.
	 * @throws NotYetImplementedException if the protocol is KERBEROSE or OAUTH2.
	 * @throws Exception
	 */
Retrieves a new credential using the the current protocol and supplied
username and password.

@param username
@param password
@return Object a credential. Generally this will be a GSSCredential until we support other protocols.
@throws NotYetImplementedException if the protocol is KERBEROSE or OAUTH2.
@throws Exception
Retrieves a new credential using the the current protocol and supplied username and password . @param username @param password @return Object a credential . Generally this will be a GSSCredential until we support other protocols . @throws NotYetImplementedException if the protocol is KERBEROSE or OAUTH2 . @throws Exception
public Object retrieveCredential(String username, char[] password) throws Exception
	{
		switch (protocol) 
		{
			case MYPROXY:
				File tempDir = new File(System.getProperty("java.io.tmpdir")
						+ File.separator + DigestUtils.md5Hex(getEndpoint()));
				TrustedCALocation trustedCALocation = new TrustedCALocation(tempDir.getAbsolutePath());
				return MyProxyClient.getCredential(endpoint, port, username, new String(password), trustedCALocation.getCaPath());
			case KERBEROSE:
				throw new NotYetImplementedException("Remote KERBEROSE support is not yet implemented");
			case OAUTH2:
				throw new NotYetImplementedException("Remote OAUTH2 support is not yet implemented");
			default:
				return null;
		}
	}
public Object retrieveCredential ( String username , char [ ] password ) throws Exception { switch ( protocol ) { case MYPROXY : File tempDir = new File ( System . getProperty ( "java.io.tmpdir" ) + File . separator + DigestUtils . md5Hex ( getEndpoint ( ) ) ) ; TrustedCALocation trustedCALocation = new TrustedCALocation ( tempDir . getAbsolutePath ( ) ) ; return MyProxyClient . getCredential ( endpoint , port , username , new String ( password ) , trustedCALocation . getCaPath ( ) ) ; case KERBEROSE : throw new NotYetImplementedException ( "Remote KERBEROSE support is not yet implemented" ) ; case OAUTH2 : throw new NotYetImplementedException ( "Remote OAUTH2 support is not yet implemented" ) ; default : return null ; } }
Retrieves a new credential using the the current protocol and supplied
 username and password.
Retrieves a new credential using the the current protocol and supplied username and password .