The CredentialsOptional flag was being ignored
The CredentialsOptional flag was being ignored

Presumably, the purpose of the CredentialsOptional flag was to allow
requests to pass through this middleware without an Authorization
header (or to prevent requests without an Authorization header from
getting through, depending on the setting).

Unfortunately, while the flag is present, it is ignored.  This corrects
the situation by using it to determine whether it is an error for a
request to be missing the authorization header.

spid37/go-jwt-middleware,jgillich/jwt-middleware,auth0/go-jwt-middleware,camuthig/go-jwt-middleware,echojc/go-jwt-middleware