if (credentialsRequestHeader != null)
{
String credentials = request.getHeader(credentialsRequestHeader);
if (credentials == null)
{
throw new PreAuthenticatedCredentialsNotFoundException(credentialsRequestHeader
+ " header value not found in request.");
}
return credentials;
}