ObtainToken: Change grant_type to authorization_code.
continuous-integration/drone/push Build is passing Details

client_credentials worked before but not anymore. 🤷
This commit is contained in:
tastytea 2020-11-13 13:03:49 +01:00
parent 41f470d2aa
commit 24cb2d523d
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 5 additions and 8 deletions

View File

@ -226,14 +226,11 @@ answer_type Instance::ObtainToken::step_1(const string_view client_name,
answer_type Instance::ObtainToken::step_2(const string_view code) answer_type Instance::ObtainToken::step_2(const string_view code)
{ {
parametermap parameters parametermap parameters{{"client_id", _client_id},
{ {"client_secret", _client_secret},
{"client_id", _client_id}, {"redirect_uri", "urn:ietf:wg:oauth:2.0:oob"},
{"client_secret", _client_secret}, {"code", code},
{"redirect_uri", "urn:ietf:wg:oauth:2.0:oob"}, {"grant_type", "authorization_code"}};
{"code", code},
{"grant_type", "client_credentials"}
};
if (!_scopes.empty()) if (!_scopes.empty())
{ {
parameters.insert({"scope", _scopes}); parameters.insert({"scope", _scopes});