~bigbes/core-go

ref: 8d15b7e1567f15ac847c9542f4d3d59a1bc5090c core-go/cmd/token/main.go -rw-r--r-- 292 bytes
8d15b7e1 — Drew DeVault auth: authenticate all requests under /query 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
}