Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

com.ibm.wps.portletservice.credentialvault.credentials
Class HttpBasicAuthCredential

java.lang.Object
  extended bycom.ibm.wps.portletservice.credentialvault.credentials.Credential
      extended bycom.ibm.wps.portletservice.credentialvault.credentials.ActiveCredential
          extended bycom.ibm.wps.portletservice.credentialvault.credentials.UserPasswordCredential
              extended bycom.ibm.wps.portletservice.credentialvault.credentials.HttpBasicAuthCredential
All Implemented Interfaces:
ActiveCredential, Credential, HttpBasicAuthCredential, java.io.Serializable, UserPasswordCredential

Deprecated. since 5.1.0.1, use the Java Portlet API and corresponding IBM portlet services instead

public class HttpBasicAuthCredential
extends UserPasswordCredential
implements HttpBasicAuthCredential

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 Http URL connection to the credential in order to add the HTTP Basic Auth header
  3. Set header
  4. Send the request
Preconditions:
  • The configuration data passed to the constructor must define the values that are required by UserPasswordCredential
Assumptions:
  • If the Url uses SSL (https://) the JSSE has already been registered

Since:
WP 5.1.0.1
See Also:
Serialized Form

Field Summary
 

Fields inherited from class com.ibm.wps.portletservice.credentialvault.credentials.UserPasswordCredential
secret
 

Fields inherited from class com.ibm.wps.portletservice.credentialvault.credentials.Credential
LOGGER_NAME
 

Fields inherited from interface com.ibm.portal.portlet.service.credentialvault.credentials.Credential
KEY_CREDENTIAL_SECRET
 

Constructor Summary
HttpBasicAuthCredential()
          Deprecated.  
 

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 java.util.Map)">init(java.util.Map config)
          Deprecated. Creates a new HttpBasicAuth credential.
 

Methods inherited from class com.ibm.wps.portletservice.credentialvault.credentials.UserPasswordCredential
getSecretType
 

Methods inherited from class com.ibm.wps.portletservice.credentialvault.credentials.ActiveCredential
isActive
 

Methods inherited from class com.ibm.wps.portletservice.credentialvault.credentials.Credential
checkInitialized
 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
 

Constructor Detail

HttpBasicAuthCredential

public HttpBasicAuthCredential()
Deprecated. 

Method Detail
java.util.Map)">

init

public void init(java.util.Map config)
          throws CredentialVaultException
Deprecated. 
Creates a new HttpBasicAuth credential.

Specified by:
java.util.Map)">init in interface HttpBasicAuthCredential
Overrides:
init in class UserPasswordCredential
Parameters:
config - No specific configuration is needed to initialize this credential.
Throws:
CredentialVaultException - If any mandatory parameter is missing or has a wrong object type as value.

getAuthenticatedConnection

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

Specified by:
getAuthenticatedConnection in interface HttpBasicAuthCredential
Parameters:
url - The traget 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

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

Specified by:
getAuthenticatedConnection in interface HttpBasicAuthCredential
Parameters:
url - The traget URL for the connection.
Returns:
HttpURLConnection A new authenticated (and yet uncommitted) connection.
Throws:
java.io.IOException - thrown if anything unexpected happened.

Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.