From: Aki Tuomi Date: Thu, 12 Aug 2021 09:42:40 +0000 (+0300) Subject: lib-oauth2: Add unit test for missing exp field X-Git-Tag: 2.3.17~167 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35f7ff1c4195364d3e80f6f2c5a53972b860609e;p=thirdparty%2Fdovecot%2Fcore.git lib-oauth2: Add unit test for missing exp field --- diff --git a/src/lib-oauth2/test-oauth2-jwt.c b/src/lib-oauth2/test-oauth2-jwt.c index aa8b1382f7..890712e48d 100644 --- a/src/lib-oauth2/test-oauth2-jwt.c +++ b/src/lib-oauth2/test-oauth2-jwt.c @@ -475,6 +475,13 @@ static void test_jwt_bad_valid_token(void) .key_values = { NULL }, .error = "Missing 'sub' field", }, + { /* no expiration */ + .key_values = { + "sub", "testuser", + NULL + }, + .error = "Missing 'exp' field", + }, { /* non-ISO date as iat */ .exp = now+500, .iat = 0,