Class BasicAuthentication

  • All Implemented Interfaces:
    ClientRequestFilter

    public class BasicAuthentication
    extends Object
    implements ClientRequestFilter
    Client filter that will do basic authentication. You must allocate it and then register it with the Client or WebTarget
    Version:
    $Revision: 1 $
    Author:
    Bill Burke
    • Constructor Detail

      • BasicAuthentication

        public BasicAuthentication​(String username,
                                   String password)
        Parameters:
        username - user name
        password - password
    • Method Detail

      • filter

        public void filter​(ClientRequestContext requestContext)
                    throws IOException
        Description copied from interface: ClientRequestFilter
        Filter method called before a request has been dispatched to a client transport layer. Filters in the filter chain are ordered according to their jakarta.annotation.Priority class-level annotation value.
        Specified by:
        filter in interface ClientRequestFilter
        Parameters:
        requestContext - request context.
        Throws:
        IOException - if an I/O exception occurs.