web/src/main/java/org/springframework/security/web/authentication/preauth/RequestHeaderAuthenticationFilter.java
protected Object getPreAuthenticatedPrincipal(HttpServletRequest request) {
		String principal = request.getHeader(principalRequestHeader);

		if (principal == null && exceptionIfHeaderMissing) {
			throw new PreAuthenticatedCredentialsNotFoundException(principalRequestHeader
					+ " header not found in request.");
		}

		return principal;
	}
protected Object getPreAuthenticatedPrincipal(HttpServletRequest request) {
		String principal = request.getHeader(principalRequestHeader);

		if (principal == null && exceptionIfHeaderMissing) {
			throw new PreAuthenticatedCredentialsNotFoundException(principalRequestHeader
					+ " header not found in request.");
		}

		return principal;
	}
Read and returns the header named by {@code principalRequestHeader} from the
request.

@throws PreAuthenticatedCredentialsNotFoundException if the header is missing and
{@code exceptionIfHeaderMissing} is set to {@code true}.