@Override
    public String toString() {
        final StringBuilder buffer = new StringBuilder();
        buffer.append("[principal: ");
        buffer.append(this.username);
        buffer.append("]");
        return buffer.toString();
    }
Basic username based principal representation.

@since 4.0
httpclient5/src/main/java/org/apache/hc/client5/http/auth/BasicUserPrincipal.java