We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9a0c3d commit 0e60d09Copy full SHA for 0e60d09
src/planet_auth_utils/commands/cli/jwt_cmd.py
@@ -53,10 +53,13 @@ def __json_pretty_dumps__(self):
53
def _human_readable_jwt_claim(d):
54
for key, value in list(d.items()):
55
if key in ["iat", "exp", "nbf"] and isinstance(value, int):
56
- # UNIX Time stamps in ISO format, with annotations.
+ # UNIX Timestamps in ISO format, with annotations.
57
fmt_time = time.strftime("%Y-%m-%dT%H:%M:%S%z", time.localtime(value))
58
- if (key == "exp") and (d[key] < time.time()):
+ now = time.time()
59
+ if (key == "exp") and (d[key] < now):
60
fmt_time += " (Expired)"
61
+ if (key == "nbf") and (d[key] > now):
62
+ fmt_time += " (Future)"
63
d[key] = fmt_time
64
elif key in ["api_key"]:
65
# Redact sensitive values
0 commit comments