feat: initial commit - kratos admin service

This commit is contained in:
yvan
2026-08-13 18:22:43 +08:00
commit be5362913b
183 changed files with 16186 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package auth
import (
"os"
"time"
)
// authSecretFromEnv retrieves the authentication secret from the environment variable.
func authSecretFromEnv(key string) string {
if secret := os.Getenv(key); secret != "" {
return secret
}
return time.Now().Format("20060102150405")
}
// cookieNameFromEnv retrieves the cookie name from the environment variable.
func cookieNameFromEnv(key string) string {
if name := os.Getenv(key); name != "" {
return name
}
return "access_token"
}