verifyBearerToken
Verify a Bearer token against the configured token. Uses a constant-time
comparison to prevent timing attacks. Returns false immediately when Bearer
token auth is not configured.
Pass the raw token — do not include the "Bearer " prefix. For full
header-based validation (including prefix parsing), use
validate().
Parameters
token
The Bearer token string to verify, without the "Bearer " prefix.
Returns
boolean — true if the token matches; false if it doesn’t, or if Bearer
auth was not configured.