Welcome to the forum - and thanks for the contribution to the community ![]()
Quick notes
Do you need to handle bearer not Bearer?
Note that “Bearer” is now case sensitive. Per original HTTP spec, auth scheme is case insensitive (RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication) however “Basic” and “Bearer” are exceptions (see RFC 6750 - The OAuth 2.0 Authorization Framework: Bearer Token Usage)
In my case, I usually just accept the good request (Bearer) - then you can simplify this by pattern match on the string - "Bearer " <> token = header






















