8000 GitHub - steamwings/build_jwt_c: demo repo using libjwt
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

steamwings/build_jwt_c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build_jwt_c

A one-function, POC library using libjwt

First, run

brew install libjwt

Build a library file

/usr/bin/clang -shared -fcolor-diagnostics -fansi-escape-codes -I./inc -I/opt/homebrew/Cellar/libjwt/1.16.0/include -L/opt/homebrew/Cellar/libjwt/1.16.0/lib -ljwt -g ./src/build_jwt.c -o ./out/build_jwt.so

Demo it

main.c is a demo. For a local build, try

/usr/bin/clang -fcolor-diagnostics -fansi-escape-codes -I./inc -I/opt/homebrew/Cellar/libjwt/1.16.0/include -L/opt/homebrew/Cellar/libjwt/1.16.0/lib -ljwt -g ./src/*.c -o ./out/main

and then ./out/main should print something like this

returned: 0
hmacAuth: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNjk1Njc1MDQ5Iiwic3ViIjoiMTIzNCJ9.JVHctlGx2WxWjr7ePRI8zCc2mgz0ek6aiYfkPth3fFMzqcdli1I4M0iFZ5hP-dWsX0aFCWvz2ETFfNw0jxW9Ew

(You can verify the signature at e.g. jwt.io)

Formatting

brew install clang-format

About

demo repo using libjwt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0