mirror of https://github.com/golang-jwt/jwt.git
Changed default "New" to use NewWithClaims internally.
This commit is contained in:
parent
22cba44699
commit
aa6ac13a18
9
jwt.go
9
jwt.go
|
@ -32,14 +32,7 @@ type Token struct {
|
|||
|
||||
// Create a new Token. Takes a signing method
|
||||
func New(method SigningMethod) *Token {
|
||||
return &Token{
|
||||
Header: map[string]interface{}{
|
||||
"typ": "JWT",
|
||||
"alg": method.Alg(),
|
||||
},
|
||||
Claims: MapClaim{},
|
||||
Method: method,
|
||||
}
|
||||
return NewWithClaims(method, MapClaim{})
|
||||
}
|
||||
|
||||
func NewWithClaims(method SigningMethod, claims Claims) *Token {
|
||||
|
|
Loading…
Reference in New Issue