Skip to content

Commit

Permalink
updating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrijalva committed Jun 16, 2014
1 parent 2c907db commit 6174711
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html
//
//
// See README.md for more info.
package jwt
package jwt
15 changes: 7 additions & 8 deletions jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ type Keyfunc func(*Token) ([]byte, error)

// A JWT Token
type Token struct {
Raw string
Header map[string]interface{}
Claims map[string]interface{}
Method SigningMethod
// This is only populated when you Parse a token
Signature string
// This is only populated when you Parse/Verify a token
Valid bool
Raw string // The raw token. Populated when you Parse a token
Method SigningMethod // The signing method used or to be used
Header map[string]interface{} // The first segment of the token
Claims map[string]interface{} // The second segment of the token
Signature string // The third segment of the token. Populated when you Parse a token
Valid bool // Is the token valid? Populated when you Parse/Verify a token
}

// Create a new Token. Takes a signing method
func New(method SigningMethod) *Token {
return &Token{
Header: map[string]interface{}{
Expand Down

0 comments on commit 6174711

Please sign in to comment.