fix (#422): retrocompatibility with authentication middleware

This commit is contained in:
Mickael Kerjean
2022-02-01 17:16:21 +11:00
parent bc2eae63c6
commit 82e12ca1a6
4 changed files with 14 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import (
"encoding/json"
"io"
"io/ioutil"
"strconv"
)
func NewBool(t bool) *bool {
@ -81,3 +82,10 @@ func PrettyPrint(json_dirty []byte) []byte {
json_pretty.Write([]byte("\n"))
return json_pretty.Bytes()
}
func CookieName(idx int) string {
if idx == 0 {
return COOKIE_NAME_AUTH
}
return COOKIE_NAME_AUTH + strconv.Itoa(idx)
}