fix: validate_auth hooks for non Authorization headers
This commit is contained in:
parent
b37ac30dc6
commit
7666ea74f1
1 changed files with 6 additions and 5 deletions
|
|
@ -573,12 +573,13 @@ def validate_auth():
|
|||
if len(authorization_header) == 2:
|
||||
validate_oauth(authorization_header)
|
||||
validate_auth_via_api_keys(authorization_header)
|
||||
validate_auth_via_hooks()
|
||||
|
||||
# If login via bearer, basic or keypair didn't work then authentication failed and we
|
||||
# should terminate here.
|
||||
if frappe.session.user in ("", "Guest"):
|
||||
raise frappe.AuthenticationError
|
||||
validate_auth_via_hooks()
|
||||
|
||||
# If login via bearer, basic or keypair didn't work then authentication failed and we
|
||||
# should terminate here.
|
||||
if frappe.session.user in ("", "Guest"):
|
||||
raise frappe.AuthenticationError
|
||||
|
||||
|
||||
def validate_oauth(authorization_header):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue