~bigbes/core-go

ref: 0936891734e7f92b7ad724caea27715f2e3e7b5c core-go/cmd/token/main.go -rw-r--r-- 291 bytes
09368917 — Drew DeVault auth: ensure semantic errors are bubbled up to user properly 9 months 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/auth"
	"git.sr.ht/~sircmpwn/core-go/config"
	"git.sr.ht/~sircmpwn/core-go/crypto"
)

func main() {
	conf := config.LoadConfig()
	crypto.InitCrypto(conf)
	tok := auth.DecodeBearerToken(os.Args[1])
	fmt.Printf("%+v\n", tok)
}