Here are the examples of the java api class org.apache.http.auth.BasicUserPrincipal taken from open source projects.
1. ExampleEvaluator#setPrincipal()
Project: jena
File: ExampleEvaluator.java
File: ExampleEvaluator.java
public void setPrincipal(String userName) { if (userName == null) { principal = null; } principal = new BasicUserPrincipal(userName); }