From 127f538a322904237d60741156a52f6450c1054a Mon Sep 17 00:00:00 2001 From: Dave Grijalva Date: Mon, 14 Sep 2015 12:07:08 -0700 Subject: [PATCH] updated documenation of SigningMethod interface --- signing_method.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/signing_method.go b/signing_method.go index 109dd0f..12cf0f3 100644 --- a/signing_method.go +++ b/signing_method.go @@ -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.