Commit ac03b610 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Set token expiration time.

parent 54b47593
......@@ -17,6 +17,7 @@ import (
"path/filepath"
"slices"
"strings"
"time"
"golang.org/x/crypto/bcrypt"
"golang.org/x/crypto/pbkdf2"
......@@ -890,6 +891,7 @@ func createTokenCmd(cmdname string, args []string) {
}
t := make(map[string]any)
t["permissions"] = perms
t["expires"] = time.Now().Add(24 * time.Hour)
if username != "" {
t["username"] = username
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment