From 2de9ce365fc5d1471ee09ae503db7498aeec4164 Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Mon, 8 Sep 2025 02:20:33 +0100 Subject: [PATCH] Increase nxapi-auth assertion validity --- src/util/nxapi-auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/nxapi-auth.ts b/src/util/nxapi-auth.ts index cc9b6a0..9c18fac 100644 --- a/src/util/nxapi-auth.ts +++ b/src/util/nxapi-auth.ts @@ -58,21 +58,21 @@ export class ClientAssertionProvider implements ClientAssertionProviderInterface public scope = 'ca:gf ca:er ca:dr', ) {} - async create(aud: string, exp = 60) { + async create(aud: string, exp = 300) { const assertion = await this.createAssertion(aud, exp); const type = 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'; return { assertion, type }; } - async createAssertion(aud: string, exp = 60) { + async createAssertion(aud: string, exp: number) { const jwt = this.createAssertionJwt(aud, exp); const key = await this.createAssertionKey(); return jwt.sign(key); } - createAssertionJwt(aud: string, exp = 60) { + createAssertionJwt(aud: string, exp: number) { const now = Math.floor(Date.now() / 1000); const data = Buffer.alloc(22 + (release?.length ?? 0));