Update .gitea/workflows/build.yaml
Build, Push and Validate Frontend / build (push) Successful in 8m42s
Build, Push and Validate Frontend / build (push) Successful in 8m42s
This commit is contained in:
+25
-25
@@ -334,31 +334,31 @@ jobs:
|
|||||||
TOKEN_METADATA="$(
|
TOKEN_METADATA="$(
|
||||||
printf '%s' "${EFFECTIVE_TOKEN}" |
|
printf '%s' "${EFFECTIVE_TOKEN}" |
|
||||||
python3 -c '
|
python3 -c '
|
||||||
import base64
|
import base64
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
token = sys.stdin.read().strip()
|
token = sys.stdin.read().strip()
|
||||||
parts = token.split(".")
|
parts = token.split(".")
|
||||||
if len(parts) != 3:
|
if len(parts) != 3:
|
||||||
print("formato=no-jwt")
|
print("formato=no-jwt")
|
||||||
raise SystemExit(0)
|
raise SystemExit(0)
|
||||||
|
|
||||||
payload = parts[1] + "=" * (-len(parts[1]) % 4)
|
payload = parts[1] + "=" * (-len(parts[1]) % 4)
|
||||||
data = json.loads(base64.urlsafe_b64decode(payload.encode()))
|
data = json.loads(base64.urlsafe_b64decode(payload.encode()))
|
||||||
|
|
||||||
subject = data.get("sub", "desconocido")
|
subject = data.get("sub", "desconocido")
|
||||||
expiration = data.get("exp")
|
expiration = data.get("exp")
|
||||||
|
|
||||||
if expiration is None:
|
if expiration is None:
|
||||||
print(f"subject={subject}; expiracion=sin-exp")
|
print(f"subject={subject}; expiracion=sin-exp")
|
||||||
else:
|
else:
|
||||||
when = datetime.datetime.fromtimestamp(
|
when = datetime.datetime.fromtimestamp(
|
||||||
expiration, datetime.timezone.utc
|
expiration, datetime.timezone.utc
|
||||||
).isoformat()
|
).isoformat()
|
||||||
print(f"subject={subject}; expiracion={when}")
|
print(f"subject={subject}; expiracion={when}")
|
||||||
'
|
'
|
||||||
)"
|
)"
|
||||||
|
|
||||||
echo "Identidad del token: ${TOKEN_METADATA}"
|
echo "Identidad del token: ${TOKEN_METADATA}"
|
||||||
|
|||||||
Reference in New Issue
Block a user