com.sapportals.wcm.util.http

Interface ICredentials


public interface ICredentials

Interface for a module implementing a HTTP authorization scheme.

Copyright (c) SAP AG 2001-2002


Method Summary
 boolean apply(IRequester requester, String uri, IRequest request, 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.
 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, String header)
          Set the credentials for this context depending on the header information (received from a 401 response).
 boolean setup(IRequester requester, 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

String getName()
Return the name of this authorization scheme

Returns:
name

apply

boolean apply(IRequester requester,
              String uri,
              IRequest request,
              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

boolean setup(IRequester requester,
              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

boolean setup(IRequester requester,
              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

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

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

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

Parameters:
requester - no longer used

canTriggerAuthentication

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
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice