Skip to content

Commit a5d9e5c

Browse files
committed
chore: add exp to jwt token
1 parent 5baa615 commit a5d9e5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/kotlin/spp/cli/PlatformCLI.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ object PlatformCLI : CliktCommand(name = "spp-cli", allowMultipleSubcommands = t
126126
.withIssuer("cli")
127127
.withClaim("developer_id", "system") //users with key are automatically considered system
128128
.withClaim("created_at", Instant.now().toEpochMilli())
129-
.withClaim("expires_at", Instant.now().plus(8760, ChronoUnit.HOURS).toEpochMilli())
129+
//todo: reasonable exp
130+
.withClaim("exp", Instant.now().plus(30, ChronoUnit.DAYS).toEpochMilli())
130131
.sign(algorithm)
131132
} else if (accessToken == null) {
132133
val tokenUri = "$serverUrl/api/new-token?authorization_code=$authorizationCode"

0 commit comments

Comments
 (0)