updated documenation of SigningMethod interface

This commit is contained in:
Dave Grijalva 2015-09-14 12:07:08 -07:00
parent 9fe8afe96d
commit 127f538a32
1 changed files with 4 additions and 4 deletions

View File

@ -2,11 +2,11 @@ package jwt
var signingMethods = map[string]func() SigningMethod{}
// Signing method
// Implement SigningMethod to add new methods for signing or verifying tokens.
type SigningMethod interface {
Verify(signingString, signature string, key interface{}) error
Sign(signingString string, key interface{}) (string, error)
Alg() string
Verify(signingString, signature string, key interface{}) error // Returns nil if signature is valid
Sign(signingString string, key interface{}) (string, error) // Returns encoded signature or error
Alg() string // returns the alg identifier for this method (example: 'HS256')
}
// Register the "alg" name and a factory function for signing method.