From 0f82848fcf2aceb725c3d21e347916f2e7540f89 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Tue, 30 Jul 2024 19:10:38 +0300 Subject: [PATCH] session/test: "generate" valid session tokens Chronology was broken for lifetime values (created already expired). Signed-off-by: Pavel Karpy --- session/test/session.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/session/test/session.go b/session/test/session.go index 88d1e53e..403a7f61 100644 --- a/session/test/session.go +++ b/session/test/session.go @@ -28,9 +28,9 @@ func Container() session.Container { tok.ApplyOnlyTo(cidtest.ID()) tok.SetID(uuid.New()) tok.SetAuthKey((*neofsecdsa.PublicKey)(&priv.PublicKey)) - tok.SetExp(11) + tok.SetIat(11) tok.SetNbf(22) - tok.SetIat(33) + tok.SetExp(33) return tok } @@ -65,9 +65,9 @@ func Object() session.Object { tok.LimitByObjects(oidtest.ID(), oidtest.ID()) tok.SetID(uuid.New()) tok.SetAuthKey((*neofsecdsa.PublicKey)(&priv.PublicKey)) - tok.SetExp(11) + tok.SetIat(11) tok.SetNbf(22) - tok.SetIat(33) + tok.SetExp(33) return tok }