This commit is contained in:
Jordan Knott
2022-05-06 16:41:52 -05:00
parent 4f5aa2deb8
commit 64093e19f6
2156 changed files with 29717 additions and 80267 deletions

14
internal/util/token.go Normal file
View File

@ -0,0 +1,14 @@
package util
import (
"crypto/rand"
"encoding/hex"
)
func GenerateAccessToken() (string, error) {
b := make([]byte, 128)
if _, err := rand.Read(b); err != nil {
return "", err
}
return hex.EncodeToString(b), nil
}