refactor: replace uniuri with custom code

This commit is contained in:
Juan Pablo Villafáñez
2024-04-17 15:54:51 +02:00
parent 05f8b7a9da
commit 8f4806f1d4
7 changed files with 32 additions and 344 deletions
@@ -1,7 +1,7 @@
package defaults
import (
"github.com/dchest/uniuri"
"github.com/owncloud/ocis/v2/ocis-pkg/generators"
"github.com/owncloud/ocis/v2/services/collaboration/pkg/config"
)
@@ -15,6 +15,7 @@ func FullDefaultConfig() *config.Config {
// DefaultConfig returns a basic default configuration
func DefaultConfig() *config.Config {
secret, _ := generators.GenerateRandomString(generators.AlphaNumChars, 32) // anything to do with the error?
return &config.Config{
Service: config.Service{
Name: "collaboration",
@@ -25,7 +26,7 @@ func DefaultConfig() *config.Config {
Icon: "image-edit",
LockName: "com.github.owncloud.collaboration",
},
JWTSecret: uniuri.NewLen(32),
JWTSecret: secret,
GRPC: config.GRPC{
Addr: "0.0.0.0:9301",
Namespace: "com.owncloud.collaboration",