~bigbes/core-go

c29515376972507ebca188742799d794b4a9c646 — Drew DeVault 5 years ago f9731e1
Add debugging command to decode OAuth tokens
1 files changed, 17 insertions(+), 0 deletions(-)

A cmd/token/main.go
A cmd/token/main.go => cmd/token/main.go +17 -0
@@ 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)
}