Yanshijie-EL / egg-swagger-doc

swagger-ui for egg
MIT License
196 stars 63 forks source link

有JWT token,正确的使用方法是怎样的? #38

Closed lijiliang closed 5 years ago

lijiliang commented 5 years ago

请问,如果在api的请求头需要加Authorization,要如何配置?

Yanshijie-EL commented 5 years ago

@request header string *Authorization

lijiliang commented 5 years ago

好的,谢谢

AlexZhong22c commented 4 years ago

不如这样设置egg-jwt吧:

config.jwt = {
  secret: 'you_guess',
  // FIXME: 调试的时候先临时把它关了:
  enable: false,
  match: /^\/api/,
}

(这么多接口,每一都加@request header string *Authorization,太难了)