added config options and nonce

This commit is contained in:
ston1th 2025-10-15 21:49:13 +02:00
commit 473d54569c
10 changed files with 146 additions and 85 deletions

View file

@ -1,4 +1,4 @@
// Copyright (C) 2018 Marius Schellenberger
// Copyright (C) 2025 Marius Schellenberger
package jwt
@ -45,7 +45,7 @@ func NewToken(claims Claims, hash Hash) *Token {
claims = make(Claims)
}
if hash == nil {
hash = NewHS256()
hash = NewHash(HS256Name)
}
return &Token{
Header: Claims{