Skip to content

Commit 78126e6

Browse files
committed
Logging
1 parent 453cb75 commit 78126e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ngx_http_auth_jwt_module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
152152
auth_jwt_algorithm = jwtcf->auth_jwt_algorithm;
153153
if (auth_jwt_algorithm.len == 0 || (auth_jwt_algorithm.len == sizeof("HS256") - 1 && ngx_strncmp(auth_jwt_algorithm.data, "HS256", sizeof("HS256") - 1)==0))
154154
{
155-
ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "got to 0");
155+
ngx_log_error(NGX_LOG_ERROR, r->connection->log, 0, "got to 0");
156156
keylen = jwtcf->auth_jwt_key.len / 2;
157157
keyBinary = ngx_palloc(r->pool, keylen);
158158
if (0 != hex_to_binary((char *)jwtcf->auth_jwt_key.data, keyBinary, jwtcf->auth_jwt_key.len))
@@ -164,14 +164,14 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
164164
else if ( auth_jwt_algorithm.len == sizeof("RS256") - 1 && ngx_strncmp(auth_jwt_algorithm.data, "RS256", sizeof("RS256") - 1) == 0 )
165165
{
166166
// in this case, 'Binary' is a misnomer, as it is the private key string itself
167-
ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "got to 1");
167+
ngx_log_error(NGX_LOG_ERROR, r->connection->log, 0, "got to 1");
168168
keyBinary = ngx_palloc(r->pool, jwtcf->auth_jwt_key.len);
169169
ngx_memcpy(keyBinary, jwtcf->auth_jwt_key.data, jwtcf->auth_jwt_key.len);
170170
keylen = jwtcf->auth_jwt_key.len;
171171
}
172172

173173
// validate the jwt
174-
ngx_log_error(NGX_LOG_DEBUG, r->connection->log, 0, "trying to decode JWT");
174+
ngx_log_error(NGX_LOG_ERROR, r->connection->log, 0, "trying to decode JWT");
175175
jwtParseReturnCode = jwt_decode(&jwt, jwtCookieValChrPtr, keyBinary, keylen);
176176

177177
if (jwtParseReturnCode != 0)

0 commit comments

Comments
 (0)