@@ -193,16 +193,27 @@ func TestValidateToken(t *testing.T) {
193193 success : false ,
194194 },
195195 {
196- name : "Not before (nbf) in future" ,
197- issuer : "https://pro-1.frontendapi.cloud.corbado.io" ,
198- sessionToken : generateJWT ("https://pro-1.frontendapi.cloud.corbado.io" , time .Now ().Add (100 * time .Second ).Unix (), time .Now ().Add (100 * time .Second ).Unix (), validPrivateKey , jwt .SigningMethodRS256 ),
196+ name : "Not before (nbf) in future" ,
197+ issuer : "https://pro-1.frontendapi.cloud.corbado.io" ,
198+ sessionToken : generateJWT (
199+ "https://pro-1.frontendapi.cloud.corbado.io" ,
200+ time .Now ().Add (100 * time .Second ).Unix (),
201+ time .Now ().Add (100 * time .Second ).Unix (),
202+ validPrivateKey ,
203+ jwt .SigningMethodRS256 ,
204+ ),
199205 validationErrorCode : validationerror .CodeJWTBefore ,
200206 success : false ,
201207 },
202208 {
203- name : "Expired (exp)" ,
204- issuer : "https://pro-1.frontendapi.cloud.corbado.io" ,
205- sessionToken : generateJWT ("https://pro-1.frontendapi.cloud.corbado.io" , time .Now ().Add (- 100 * time .Second ).Unix (), time .Now ().Add (- 100 * time .Second ).Unix (), validPrivateKey , jwt .SigningMethodRS256 ),
209+ name : "Expired (exp)" ,
210+ issuer : "https://pro-1.frontendapi.cloud.corbado.io" ,
211+ sessionToken : generateJWT ("https://pro-1.frontendapi.cloud.corbado.io" ,
212+ time .Now ().Add (- 100 * time .Second ).Unix (),
213+ time .Now ().Add (- 100 * time .Second ).Unix (),
214+ validPrivateKey ,
215+ jwt .SigningMethodRS256 ,
216+ ),
206217 validationErrorCode : validationerror .CodeJWTExpired ,
207218 success : false ,
208219 },
0 commit comments