Adds NewJWT

This commit is contained in:
2015-08-26 14:08:02 +02:00
parent 336987e806
commit f64f225b18

4
jwt.go
View File

@@ -74,3 +74,7 @@ type TokenCreator func() interface{}
func RegisterJwtType(ctx context.Context, generator TokenCreator) context.Context {
return context.WithValue(ctx, jwtKeyGenerator, generator)
}
func NewJWT(s jwt.Signer) *JWT {
return &JWT{signer: s}
}