feat: add "key-rotate" command (#709)

This commit is contained in:
Alessandro (Ale) Segala
2025-07-03 13:23:24 -07:00
committed by GitHub
parent 15ece0ab30
commit 8c8fc2304d
9 changed files with 465 additions and 87 deletions

View File

@@ -0,0 +1,31 @@
package cmds
import (
"log/slog"
"os"
"github.com/spf13/cobra"
"github.com/pocket-id/pocket-id/backend/internal/bootstrap"
)
var rootCmd = &cobra.Command{
Use: "pocket-id",
Short: "A simple and easy-to-use OIDC provider that allows users to authenticate with their passkeys to your services.",
Long: "By default, this command starts the pocket-id server.",
Run: func(cmd *cobra.Command, args []string) {
// Start the server
err := bootstrap.Bootstrap()
if err != nil {
slog.Error("Failed to run pocket-id", "error", err)
os.Exit(1)
}
},
}
func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}