Class HttpBasicAuth

  • All Implemented Interfaces:
    Authentication

    @Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator")
    public final class HttpBasicAuth
    extends Object
    implements Authentication
    Applies HTTP basic authentication with a username and password to a request.
    • Constructor Detail

      • HttpBasicAuth

        public HttpBasicAuth​(String username,
                             String password)
        A new authentication that uses a basic username and password.
        Parameters:
        username - The username for the basic auth.
        password - The password for the basic auth.
    • Method Detail

      • username

        public String username()
        Returns:
        The username for the basic auth.
      • password

        public String password()
        Returns:
        The password for the basic auth.
      • applyToParams

        public void applyToParams​(ApiCall<?> call)
        Description copied from interface: Authentication
        Apply authentication settings to header and query params.
        Specified by:
        applyToParams in interface Authentication
        Parameters:
        call - API call with all parameters that can be modified.
      • withUsername

        public HttpBasicAuth withUsername​(String username)
        Parameters:
        username - The username for the basic auth.
        Returns:
        A new immutable instance with the new data.
      • withPassword

        public HttpBasicAuth withPassword​(String password)
        Parameters:
        password - The password for the basic auth.
        Returns:
        A new immutable instance with the new data.