Files
photoprism/pkg/rnd/uuid.go
Michael Mayer c970511c82 OIDC: Upgrade "zitadel/oidc" from v1 to v2 #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-06 11:15:23 +02:00

18 lines
365 B
Go

package rnd
import (
"github.com/google/uuid"
)
// UUID returns a random string based on RFC 4122 (UUID Version 4) or panics.
//
// The strength of the UUID depends on the "crypto/rand" package.
func UUID() string {
return uuid.NewString()
}
// State is an alias for UUID for use in the context of OpenID Connect (OIDC).
func State() string {
return UUID()
}