Fix #1670 API password grant type authentication is broken
Merge pull request #883 from nlegoff/fix-1670

[3.8] Fix #1670 API password grant type authentication is broken