Commit f5150a3c authored by Boiget Boiget's avatar Boiget Boiget

Keycloak: better handling of user/password parameters (URI encode)

parent b2f224b8
Pipeline #2319 failed with stages
in 2 minutes and 9 seconds
......@@ -29,7 +29,9 @@ class KeyCloakClient {
const { adminPassword } = Meteor.settings.keycloak;
return axios.post(
`${this.kcURL}/realms/master/protocol/openid-connect/token`,
`username=${adminUser}&password=${adminPassword}&grant_type=password&client_id=admin-cli`,
`username=${encodeURIComponent(adminUser)}&password=${encodeURIComponent(
adminPassword,
)}&grant_type=password&client_id=admin-cli`,
{
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment