Skip to content

Commit 30a231b

Browse files
committed
cleaning up whitespace
cleaning up whitespace
1 parent da89753 commit 30a231b

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/ngx_http_auth_jwt_module.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static char * ngx_http_auth_jwt_merge_loc_conf(ngx_conf_t *cf, void *parent, voi
2323
static int hex_char_to_binary( char ch, char* ret );
2424
static int hex_to_binary( const char* str, u_char* buf, int len );
2525

26-
static ngx_command_t ngx_http_auth_jwt_commands[] = {
26+
static ngx_command_t ngx_http_auth_jwt_commands[] = {
2727

2828
{ ngx_string("auth_jwt_loginurl"),
2929
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
@@ -38,19 +38,19 @@ static ngx_command_t ngx_http_auth_jwt_commands[] = {
3838
NGX_HTTP_LOC_CONF_OFFSET,
3939
offsetof(ngx_http_auth_jwt_loc_conf_t, auth_jwt_key),
4040
NULL },
41-
41+
4242
{ ngx_string("auth_jwt_enabled"),
4343
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
4444
ngx_conf_set_flag_slot,
4545
NGX_HTTP_LOC_CONF_OFFSET,
4646
offsetof(ngx_http_auth_jwt_loc_conf_t, auth_jwt_enabled),
4747
NULL },
4848

49-
ngx_null_command
49+
ngx_null_command
5050
};
5151

5252

53-
static ngx_http_module_t ngx_http_auth_jwt_module_ctx = {
53+
static ngx_http_module_t ngx_http_auth_jwt_module_ctx = {
5454
NULL, /* preconfiguration */
5555
ngx_http_auth_jwt_init, /* postconfiguration */
5656

@@ -65,7 +65,7 @@ static ngx_http_module_t ngx_http_auth_jwt_module_ctx = {
6565
};
6666

6767

68-
ngx_module_t ngx_http_auth_jwt_module = {
68+
ngx_module_t ngx_http_auth_jwt_module = {
6969
NGX_MODULE_V1,
7070
&ngx_http_auth_jwt_module_ctx, /* module context */
7171
ngx_http_auth_jwt_commands, /* module directives */
@@ -89,7 +89,7 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
8989
ngx_str_t jwtCookieVal;
9090
char* jwtCookieValChrPtr;
9191
char* return_url;
92-
ngx_http_auth_jwt_loc_conf_t *jwtcf;
92+
ngx_http_auth_jwt_loc_conf_t *jwtcf;
9393
u_char *keyBinary;
9494
jwt_t *jwt;
9595
int jwtParseReturnCode;
@@ -201,8 +201,8 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
201201
if(request_uri_var && !request_uri_var->not_found && request_uri_var->valid)
202202
{
203203
// ideally we would like the uri with the querystring parameters
204-
uri.data = ngx_palloc(r->pool, request_uri_var->len);
205-
uri.len = request_uri_var->len;
204+
uri.data = ngx_palloc(r->pool, request_uri_var->len);
205+
uri.len = request_uri_var->len;
206206
ngx_memcpy(uri.data, request_uri_var->data, request_uri_var->len);
207207
}
208208
else
@@ -262,7 +262,7 @@ static ngx_int_t ngx_http_auth_jwt_init(ngx_conf_t *cf)
262262
static void *
263263
ngx_http_auth_jwt_create_loc_conf(ngx_conf_t *cf)
264264
{
265-
ngx_http_auth_jwt_loc_conf_t *conf;
265+
ngx_http_auth_jwt_loc_conf_t *conf;
266266

267267
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_auth_jwt_loc_conf_t));
268268
if (conf == NULL)
@@ -282,45 +282,45 @@ ngx_http_auth_jwt_create_loc_conf(ngx_conf_t *cf)
282282
static char *
283283
ngx_http_auth_jwt_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
284284
{
285-
ngx_http_auth_jwt_loc_conf_t *prev = parent;
286-
ngx_http_auth_jwt_loc_conf_t *conf = child;
285+
ngx_http_auth_jwt_loc_conf_t *prev = parent;
286+
ngx_http_auth_jwt_loc_conf_t *conf = child;
287287

288288
ngx_conf_merge_str_value(conf->auth_jwt_loginurl, prev->auth_jwt_loginurl, "");
289289
ngx_conf_merge_str_value(conf->auth_jwt_key, prev->auth_jwt_key, "");
290290

291291

292292
if (conf->auth_jwt_enabled == ((ngx_flag_t) -1))
293293
{
294-
conf->auth_jwt_enabled = (prev->auth_jwt_enabled == ((ngx_flag_t) -1)) ? 0 : prev->auth_jwt_enabled;
294+
conf->auth_jwt_enabled = (prev->auth_jwt_enabled == ((ngx_flag_t) -1)) ? 0 : prev->auth_jwt_enabled;
295295
}
296296

297297
ngx_conf_log_error(NGX_LOG_DEBUG, cf, 0, "Merged Location Configuration");
298298

299299
// ngx_conf_log_error(NGX_LOG_ERR, cf, 0, "Key: %s, Enabled: %d",
300300
// conf->auth_jwt_key.data,
301301
// conf->auth_jwt_enabled);
302-
return NGX_CONF_OK;
302+
return NGX_CONF_OK;
303303
}
304304

305305
static int
306306
hex_char_to_binary( char ch, char* ret )
307307
{
308-
ch = tolower( ch );
308+
ch = tolower( ch );
309309
if( isdigit( ch ) )
310-
*ret = ch - '0';
310+
*ret = ch - '0';
311311
else if( ch >= 'a' && ch <= 'f' )
312312
*ret = ( ch - 'a' ) + 10;
313313
else if( ch >= 'A' && ch <= 'F' )
314-
*ret = ( ch - 'A' ) + 10;
314+
*ret = ( ch - 'A' ) + 10;
315315
else
316316
return *ret = 0;
317-
return 1;
317+
return 1;
318318
}
319319

320320
static int
321321
hex_to_binary( const char* str, u_char* buf, int len ) {
322322
u_char
323-
*cpy = buf;
323+
*cpy = buf;
324324
char
325325
low,
326326
high;
@@ -337,6 +337,6 @@ hex_to_binary( const char* str, u_char* buf, int len ) {
337337

338338
*cpy++ = low | (high << 4);
339339
}
340-
return 0;
340+
return 0;
341341
}
342342

0 commit comments

Comments
 (0)