Skip to content

dahernan/token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Secure Token Go library to emit tokens

Usage:

Please do copy & paste the code, don't create more dependencies :)

// Generate token with id
tgen := token.NewTokenHmacSha(secret)
token := tgen.Generate(id)

// Check if the token is valid for a given duration
valid, id, issueTime := tgen.Valid(token, 10*time.Minute)

About

Secure Token Go library to emit tokens

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages