Apache CXF API

org.apache.cxf.transport.http.auth
Interface HttpAuthSupplier

All Known Implementing Classes:
DefaultBasicAuthSupplier, DigestAuthSupplier, SpnegoAuthSupplier

public interface HttpAuthSupplier

Supplies Authorization information to an HTTPConduit.

A HTTPConduit keeps a reference to this HttpAuthSupplier for the life of the HTTPConduit, unless changed out by dynamic configuration. Therefore, an implementation of this HttpAuthSupplier may maintain state for subsequent calls.

For instance, an implementation may not provide a Authorization preemptively for a particular URL and decide to get the realm information from a 401 response in which the HTTPConduit will call getAuthorization for that URL. Then this implementation may provide the Authorization for this particular URL preemptively for subsequent calls to getAuthorization.


Method Summary
 String getAuthorization(AuthorizationPolicy authPolicy, URL url, Message message, String fullHeader)
          The HTTPConduit makes a call to this method to obtain an Authentication token for http authentication.
 boolean requiresRequestCaching()
          If the supplier requires the request to be cached to be resent, return true
 

Method Detail

requiresRequestCaching

boolean requiresRequestCaching()
If the supplier requires the request to be cached to be resent, return true


getAuthorization

String getAuthorization(AuthorizationPolicy authPolicy,
                        URL url,
                        Message message,
                        String fullHeader)
The HTTPConduit makes a call to this method to obtain an Authentication token for http authentication.

Parameters:
authPolicy - credentials for the authentication
url - The URL we want to connect to
message - The CXF Message
fullHeader - The full WWW-Authenticate header or null if preemptive auth
Returns:
token for Authenticate string or null if authentication is not possible

Apache CXF API

Apache CXF