pub async fn validate_token_with_header<B>(
req: &Request<B>,
validator_url: &str,
header_name: &str,
) -> Result<bool>Expand description
Validate token with custom header name
Similar to validate_token but allows specifying a custom header
name for the token (e.g., “X-Auth-Token” instead of “Authorization”).
§Arguments
req- The incoming HTTP requestvalidator_url- URL of the external token validation serviceheader_name- Name of the header containing the token
§Returns
Ok(true)- Token is validOk(false)- Token is invalidErr(...)- Error occurred during validation