Interface HttpAuthSupplier

  • All Known Implementing Classes:
    CustomAuthSupplier, 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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getAuthorization​(org.apache.cxf.configuration.security.AuthorizationPolicy authPolicy, URI uri, org.apache.cxf.message.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​(org.apache.cxf.configuration.security.AuthorizationPolicy authPolicy,
                                URI uri,
                                org.apache.cxf.message.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
        uri - The URI 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