🐛 Restore missing token utils

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
Itxaka
2023-03-29 13:34:24 +02:00
parent ad3c0f6cd6
commit 7a0ac7c663

13
utils/token.go Normal file
View File

@@ -0,0 +1,13 @@
package utils
import "strings"
const sep = "_CREDENTIALS_"
func EncodeRecoveryToken(data ...string) string {
return strings.Join(data, sep)
}
func DecodeRecoveryToken(recoverytoken string) []string {
return strings.Split(recoverytoken, sep)
}