Changed default "New" to use NewWithClaims internally.

This commit is contained in:
Jamie Stackhouse 2015-07-20 14:45:40 -03:00
parent 22cba44699
commit aa6ac13a18
1 changed files with 1 additions and 8 deletions

9
jwt.go
View File

@ -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 {