go-ozzo / ozzo-routing

An extremely fast Go (golang) HTTP router that supports regular expression route matching. Comes with full support for building RESTful APIs.
MIT License
455 stars 51 forks source link

auth.JWT使用动态密钥 #27

Closed ohJohanZ closed 8 years ago

ohJohanZ commented 8 years ago

Hi,强哥 在使用auth.JWT过程中,signingKey是根据二级域名动态变化的,那么我要如何使用 r.Use(auth.JWT(signingKey)) ?

qiangxue commented 8 years ago

一个办法是修改JWTOptions, 添加GetVerificationKey属性。如果这个属性非空,每次就调用它生成一个key。

qiangxue commented 8 years ago

Fixed by https://github.com/go-ozzo/ozzo-routing/pull/28 谢谢!