mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-17 23:58:40 +00:00
🐛 Restore missing token utils
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
13
utils/token.go
Normal file
13
utils/token.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user