I am making a REST call to an external system and the end point URL is defined as www.xyz.com/userid=XXX&Password=xyz. I need to set this as an endpoint when making a apex rest callout. Also I am using named credentials to set the end point URL and username/password.
But this is posing a security issue because userid and password should not be sent as part of the URL as it is visible to outside world. Also the external system understands userid and not username as parameter. How can I overcome this security issue. When talking to people I heard I should be sending the username and password in POST parameter of the body. Is this a fisible way? I do not want to change the code every time when the endpoint or username/password changes. I would like to use something like Named credentials for making changes instead of touching the code every time. Any ideas?