motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.8k stars 320 forks source link

Fix bug for introspection in oauth2 plugin #295

Closed coolerfall closed 6 years ago

coolerfall commented 6 years ago

What does this PR do?

Fix bug for introspection in oauth2 plugin:

  1. http.Request.Form should be make before using.
  2. The tag mapstructure should be set in IntrospectionSettings.
coolerfall commented 6 years ago

@ italolelis I checked API.feature, and I saw that you guys use lower case config field, such as use_auth_header, auth_header_type. However, it did not work when I configured introspection like this. I checked the source code to find that the setting field is not tagged with mapstructure, so I add the tag, and it works.