chore(auth): add service structs and test error handling
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 49s

This commit is contained in:
2024-09-20 22:19:02 +02:00
parent 7e3e9388e2
commit e53a0e5cf7
4 changed files with 130 additions and 99 deletions

View File

@@ -1,16 +0,0 @@
package utils
import (
"crypto/rand"
"encoding/base64"
)
func RandomToken() (string, error) {
b := make([]byte, 32)
_, err := rand.Read(b)
if err != nil {
return "", err
}
return base64.StdEncoding.EncodeToString(b), nil
}