@@ -23,9 +23,9 @@ typedef struct {
23
23
ngx_str_t auth_jwt_key ;
24
24
ngx_flag_t auth_jwt_enabled ;
25
25
ngx_flag_t auth_jwt_redirect ;
26
+ ngx_flag_t auth_jwt_email_validation ;
26
27
ngx_str_t auth_jwt_validation_type ;
27
28
ngx_str_t auth_jwt_algorithm ;
28
- ngx_flag_t auth_jwt_validate_email ;
29
29
30
30
} ngx_http_auth_jwt_loc_conf_t ;
31
31
@@ -65,6 +65,13 @@ static ngx_command_t ngx_http_auth_jwt_commands[] = {
65
65
offsetof(ngx_http_auth_jwt_loc_conf_t , auth_jwt_redirect ),
66
66
NULL },
67
67
68
+ { ngx_string ("auth_jwt_email_validation" ),
69
+ NGX_HTTP_MAIN_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_LOC_CONF |NGX_CONF_FLAG ,
70
+ ngx_conf_set_flag_slot ,
71
+ NGX_HTTP_LOC_CONF_OFFSET ,
72
+ offsetof(ngx_http_auth_jwt_loc_conf_t , auth_jwt_email_validation ),
73
+ NULL },
74
+
68
75
{ ngx_string ("auth_jwt_validation_type" ),
69
76
NGX_HTTP_MAIN_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_LOC_CONF |NGX_CONF_TAKE1 ,
70
77
ngx_conf_set_str_slot ,
@@ -79,13 +86,6 @@ static ngx_command_t ngx_http_auth_jwt_commands[] = {
79
86
offsetof(ngx_http_auth_jwt_loc_conf_t , auth_jwt_algorithm ),
80
87
NULL },
81
88
82
- { ngx_string ("auth_jwt_validate_email" ),
83
- NGX_HTTP_MAIN_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_LOC_CONF |NGX_CONF_FLAG ,
84
- ngx_conf_set_flag_slot ,
85
- NGX_HTTP_LOC_CONF_OFFSET ,
86
- offsetof(ngx_http_auth_jwt_loc_conf_t , auth_jwt_validate_email ),
87
- NULL },
88
-
89
89
ngx_null_command
90
90
};
91
91
@@ -213,7 +213,7 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
213
213
set_custom_header_in_headers_out (r , & useridHeaderName , & sub_t );
214
214
}
215
215
216
- if (jwtcf -> auth_jwt_validate_email == NULL || !jwtcf -> auth_jwt_validate_email )
216
+ if (jwtcf -> auth_jwt_email_validation == NULL || !jwtcf -> auth_jwt_email_validation )
217
217
{
218
218
email = jwt_get_grant (jwt , "emailAddress" );
219
219
if (email == NULL )
0 commit comments