Skip to content

Commit 24994e0

Browse files
oauth2: fix token expiration check (#3373)
Signed-off-by: Igor Peshansky <[email protected]>
1 parent e3e0bb0 commit 24994e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/flb_oauth2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ char *flb_oauth2_token_get(struct flb_oauth2 *ctx)
328328

329329
now = time(NULL);
330330
if (ctx->access_token) {
331-
/* validate expired token */
332-
if (ctx->expires < now && flb_sds_len(ctx->access_token) > 0) {
331+
/* validate unexpired token */
332+
if (ctx->expires > now && flb_sds_len(ctx->access_token) > 0) {
333333
return ctx->access_token;
334334
}
335335
}

0 commit comments

Comments
 (0)