Salesforce Rest API Securely passing credentials in Username-password authentication flow
When an external system makes a call to a Salesforce Rest API, to get the auth token, you call the oauth2/token api with username-password authentication flow takes the credentials in plain text.
read more