From c29515376972507ebca188742799d794b4a9c646 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 20 Feb 2021 12:35:51 -0500 Subject: [PATCH] Add debugging command to decode OAuth tokens --- cmd/token/main.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cmd/token/main.go diff --git a/cmd/token/main.go b/cmd/token/main.go new file mode 100644 index 0000000000000000000000000000000000000000..a5c7f472bea5a5a25e7747dcabc0164c367c3204 --- /dev/null +++ b/cmd/token/main.go @@ -0,0 +1,17 @@ +package main + +import ( + "fmt" + "os" + + "git.sr.ht/~sircmpwn/core-go/config" + "git.sr.ht/~sircmpwn/core-go/crypto" + "git.sr.ht/~sircmpwn/core-go/auth" +) + +func main() { + conf := config.LoadConfig(":1111") + crypto.InitCrypto(conf) + tok := auth.DecodeToken(os.Args[1]) + fmt.Printf("%+v\n", tok) +}