Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ jwt-nim Public
forked from vercingetorx/jwt-nim

Pure Nim implementation of JWT

License

oxyo/jwt-nim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pure Nim implementation of JWT (JSON Web Token). Currently supports SHA256 and SHA512.

let secret = tokenUrlSafe(128)
# NOTE: claims
let payload = %* {
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}

let token = sign(payload, secret)
echo fmt"JWT: {token}"

let isValid = verify(token, secret)
echo fmt"valid token: {isValid}"

About

Pure Nim implementation of JWT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nim 100.0%