SAP NetWeaver '04

com.sapportals.wcm.util.http
Interface ICredentials

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
public interface ICredentials

Interface for a module implementing a HTTP authorization scheme.

Copyright (c) SAP AG 2001-2002


Method Summary
 boolean apply(IRequester requester, java.lang.String uri, IRequest request, java.lang.String headerName)
          Calculate the credentials for this HTTP Request
 boolean canTriggerAuthentication(IRequester requester)
          Return if credentials can trigger HTTP 401 reponses for this requester
 void endUse(IRequester requester)
          Announce to credentials that they are no longer used for the specified requester.
 java.lang.String getName()
          Return the name of this authorization scheme
 void got(IRequester requester, IResponse response)
          Process authenticate information in the response message, like Authenticate-Info.
 boolean setup(IRequester requester, java.lang.String header)
          Set the credentials for this context depending on the header information (received from a 401 response).
 boolean setup(IRequester requester, java.lang.String header, boolean retry)
          Set the credentials for this context depending on the header information (received from a 401 response).
 void startUse(IRequester requester)
          Announce to credentials that they are used on a new connection for the specified requester.
 

Method Detail

getName

public java.lang.String getName()
Return the name of this authorization scheme
Returns:
name

apply

public boolean apply(IRequester requester,
                     java.lang.String uri,
                     IRequest request,
                     java.lang.String headerName)
              throws WcmException
Calculate the credentials for this HTTP Request
Parameters:
uri - of request
request - to make
headerName - of authorization header
requester - TBD: Description of the incoming method parameter
Returns:
if credential was applied to request
Throws:
WcmException - Exception raised in failure situation

setup

public boolean setup(IRequester requester,
                     java.lang.String header)
              throws WcmException
Set the credentials for this context depending on the header information (received from a 401 response). The header will start with the name of this credential.
Parameters:
header - value from WWW-Authenticate response header
requester - TBD: Description of the incoming method parameter
Returns:
if setup was successfull and credentials can be calculated
Throws:
WcmException - Exception raised in failure situation

setup

public boolean setup(IRequester requester,
                     java.lang.String header,
                     boolean retry)
              throws WcmException
Set the credentials for this context depending on the header information (received from a 401 response). The header will start with the name of this credential.
Parameters:
header - value from WWW-Authenticate response header
retry - true, if the scheme was already tried before
requester - TBD: Description of the incoming method parameter
Returns:
if setup was successfull and credentials can be calculated
Throws:
WcmException - Exception raised in failure situation

got

public void got(IRequester requester,
                IResponse response)
         throws WcmException
Process authenticate information in the response message, like Authenticate-Info.
Parameters:
requester - TBD: Description of the incoming method parameter
response - TBD: Description of the incoming method parameter
Throws:
WcmException - Exception raised in failure situation

startUse

public void startUse(IRequester requester)
Announce to credentials that they are used on a new connection for the specified requester.
Parameters:
requester - to apply credentials to

endUse

public void endUse(IRequester requester)
Announce to credentials that they are no longer used for the specified requester.
Parameters:
requester - no longer used

canTriggerAuthentication

public boolean canTriggerAuthentication(IRequester requester)
Return if credentials can trigger HTTP 401 reponses for this requester
Parameters:
requester - to work with
Returns:
TBD: Description of the outgoing return value

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.