@Override
	public void commence(HttpServletRequest request, HttpServletResponse response, // LB
					AuthenticationException authException) throws IOException {
		// Get the first part of url path and use it as a realm.
		String pathInfo = request.getPathInfo();
		String[] split = StringUtils.split(pathInfo, '/');
		response.addHeader("WWW-Authenticate", "Basic realm=\"" + StringUtils.defaultIfBlank(split[0], "admin") + "\"");
		response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());
	}
Dynamic Realm returnable HttpBasic {@link AuthenticationEntryPoint}.

@since 3.2
ngrinder-controller/src/main/java/org/ngrinder/security/SvnHttpBasicEntryPoint.java