Skip to content

Commit

Permalink
feat: handle case of token not having a exp time
Browse files Browse the repository at this point in the history
The token will be cleared, and the expiry time will be
set to 1 second. Then another authentication attempt
will be made.
  • Loading branch information
jr0me committed Aug 8, 2024
1 parent 7d91137 commit 9aaa959
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/agent/communicator/src/communicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ namespace communicator
else
{
std::cerr << "Token does not contain an 'exp' claim" << std::endl;
m_token.clear();
m_tokenExpTimeInSeconds = 1;
return boost::beast::http::status::unauthorized;
}

Expand Down

0 comments on commit 9aaa959

Please sign in to comment.