@Override
    public Principal getUserPrincipal() {
        return this.principal;
    }
The constructor with the username and password arguments.

@param username the user name
@param password the password
httpclient5/src/main/java/org/apache/hc/client5/http/auth/UsernamePasswordCredentials.java