com.ibm.portal.portlet.service.credentialvault.credentials
Interface HttpBasicAuthCredential

All Superinterfaces:
ActiveCredential, Credential, UserPasswordCredential
All Known Implementing Classes:
HttpBasicAuthCredential

Deprecated. Since 8.5.

public interface HttpBasicAuthCredential
extends UserPasswordCredential

Credential for authenticating at the back-end via http basic authentication. To be used in following way:

  1. Construct (initialize) the credential
  2. Pass an HttpURLConnection to the credential in order to add the HTTP Basic Auth header
  3. Set header
  4. Send the request
Preconditions: Assumptions:

Since:
5.1.0.1

Field Summary
 
Fields inherited from interface com.ibm.portal.portlet.service.credentialvault.credentials.Credential
KEY_CREDENTIAL_SECRET
 
Method Summary
 java.net.HttpURLConnection getAuthenticatedConnection(java.lang.String url)
          Deprecated. Returns a new Http URL connection with added authentication data.
 java.net.HttpURLConnection getAuthenticatedConnection(java.net.URL url)
          Deprecated. Returns a new Http URL connection with added authentication data.
 void init(java.util.Map<java.lang.String,java.lang.Object> config)
          Deprecated. Initializes a new HttpBasicAuthCredential.
 
Methods inherited from interface com.ibm.portal.portlet.service.credentialvault.credentials.UserPasswordCredential
getSecretType
 
Methods inherited from interface com.ibm.portal.portlet.service.credentialvault.credentials.ActiveCredential
isActive
 

Method Detail

init

void init(java.util.Map<java.lang.String,java.lang.Object> config)
          throws CredentialVaultException
Deprecated. 
Initializes a new HttpBasicAuthCredential.

Specified by:
init in interface Credential
Specified by:
init in interface UserPasswordCredential
Parameters:
config - No specific configuration is needed to initialize this credential, also it must define the values that are required by UserPasswordCredential
Throws:
CredentialVaultException - If any mandatory parameter is missing or has a wrong object type as value.

getAuthenticatedConnection

java.net.HttpURLConnection getAuthenticatedConnection(java.net.URL url)
                                                      throws java.io.IOException
Deprecated. 
Returns a new Http URL connection with added authentication data.

Parameters:
url - The target URL for the connection. Note that it need not be opened yet.
Returns:
HttpURLConnection A new authenticated (and yet uncommitted) connection
Throws:
java.io.IOException - thrown if anything unexpected happened

getAuthenticatedConnection

java.net.HttpURLConnection getAuthenticatedConnection(java.lang.String url)
                                                      throws java.io.IOException
Deprecated. 
Returns a new Http URL connection with added authentication data.

Parameters:
url - The target URL for the connection
Returns:
HttpURLConnection A new authenticated (and yet uncommitted) connection.
Throws:
java.io.IOException - thrown if anything unexpected happened.