This seems error prone. Can you check the type of Authorization header as well? I know it will throw an unauthorized error if the length is not as expected which could be enough but just food for thought.
Maybe something like:
if len(bearerToken) == 2 && strings.Contains(bearerToken[0], "Bearer") {
Originally posted by @syntacticNaCl in #33
This seems error prone. Can you check the type of
Authorizationheader as well? I know it will throw an unauthorized error if the length is not as expected which could be enough but just food for thought.Maybe something like:
Originally posted by @syntacticNaCl in #33