mirror of
https://github.com/jech/galene.git
synced 2024-11-22 00:25:58 +01:00
Set token expiration time.
This commit is contained in:
parent
54b4759300
commit
ac03b610ef
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue