-
Notifications
You must be signed in to change notification settings - Fork 132
Closed
Description
Hello,
First of all thanks for your work!
When using your module I came across "failed to parse JWT" error multiple times. After digging in it turns out that in Authorization header 'bearer' was not in capital letter. According to standards RFC 7235 Section 2.1 the auth-scheme part of an HTTP Authorization header is case-insensitive.
My quickfix was to change this line to
if (ngx_strncasecmp(jwtHeaderVal->value.data, (u_char *)BEARER_PREFIX, strlen(BEARER_PREFIX)) == 0)
But I'm no C developer so I believe you could fix it in more elegant way.
Thanks in advance.
Mateusz54 and MaMarkowKo2nel
Metadata
Metadata
Assignees
Labels
No labels