curl -X POST https://{your frappe instance}/api/method/login
-H ‘Content-Type: application/json’
-H ‘Accept: application/json’
-d ‘{“usr”:“Administrator”,“pwd”:“admin”}’
When I use this method with erpnext user, authentacation is success.
{
"message": "Logged In",
"home_page": "/app",
"full_name": "Administrator"
}
But When I use login with ldap user, return this;
{
"message": "Invalid login credentials",
"exception": "frappe.exceptions.AuthenticationError",
"exc": "[\"Traceback (most recent call last):\\n File \\\"apps/frappe/frappe/app.py\\\", line 56, in application\\n init_request(request)\\n File \\\"apps/frappe/frappe/app.py\\\", line 131, in init_request\\n frappe.local.http_request = frappe.auth.HTTPRequest()\\n File \\\"apps/frappe/frappe/auth.py\\\", line 37, in __init__\\n self.set_session()\\n File \\\"apps/frappe/frappe/auth.py\\\", line 74, in set_session\\n frappe.local.login_manager = LoginManager()\\n File \\\"apps/frappe/frappe/auth.py\\\", line 121, in __init__\\n if self.login() == False:\\n File \\\"apps/frappe/frappe/auth.py\\\", line 144, in login\\n self.authenticate(user=user, pwd=pwd)\\n File \\\"apps/frappe/frappe/auth.py\\\", line 246, in authenticate\\n self.fail(\\\"Invalid login credentials\\\")\\n File \\\"apps/frappe/frappe/auth.py\\\", line 301, in fail\\n raise frappe.AuthenticationError\\nfrappe.exceptions.AuthenticationError\\n\"]"
}