Skip to content

Commit

Permalink
* FIX [jwt] ignore validate aud & iat
Browse files Browse the repository at this point in the history
  • Loading branch information
alvin1221 authored and JaylinYu committed Apr 26, 2023
1 parent f45a581 commit 5cb7830
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions nanomq/apps/broker.c
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,7 @@ broker(conf *nanomq_conf)
log_error("Not support for App lib\n");
#endif
}
printf("NanoMQ Broker is started successfully!\n");

#if defined(ENABLE_NANOMQ_TESTS)
bool is_testing = true;
Expand Down
4 changes: 4 additions & 0 deletions nanomq/rest_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,10 @@ jwt_authorize(http_msg *msg)
params.verification_key = (uint8_t *) server->jwt.public_key;
params.verification_key_length = server->jwt.public_key_len;

params.validate_aud = NULL;
params.validate_aud_length = 0;

params.validate_iat = 0;
params.validate_exp = 1;
params.exp_tolerance_seconds = 200;

Expand Down

0 comments on commit 5cb7830

Please sign in to comment.