fix: reorder session initialization in HTTPRequest class
This commit is contained in:
parent
829a1404da
commit
8560764910
1 changed files with 5 additions and 5 deletions
|
|
@ -38,12 +38,12 @@ class HTTPRequest:
|
||||||
# load cookies
|
# load cookies
|
||||||
self.set_cookies()
|
self.set_cookies()
|
||||||
|
|
||||||
# login and start/resume user session
|
|
||||||
self.set_session()
|
|
||||||
|
|
||||||
# set request language
|
# set request language
|
||||||
self.set_lang()
|
self.set_lang()
|
||||||
|
|
||||||
|
# login and start/resume user session
|
||||||
|
self.set_session()
|
||||||
|
|
||||||
# match csrf token from current session
|
# match csrf token from current session
|
||||||
self.validate_csrf_token()
|
self.validate_csrf_token()
|
||||||
|
|
||||||
|
|
@ -631,7 +631,7 @@ def validate_oauth(authorization_header):
|
||||||
Authenticate request using OAuth and set session user
|
Authenticate request using OAuth and set session user
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
authorization_header (list of str): The 'Authorization' header containing the prefix and token
|
authorization_header (list of str): The 'Authorization' header containing the prefix and token
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from frappe.integrations.oauth2 import get_oauth_server
|
from frappe.integrations.oauth2 import get_oauth_server
|
||||||
|
|
@ -671,7 +671,7 @@ def validate_auth_via_api_keys(authorization_header):
|
||||||
Authenticate request using API keys and set session user
|
Authenticate request using API keys and set session user
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
authorization_header (list of str): The 'Authorization' header containing the prefix and token
|
authorization_header (list of str): The 'Authorization' header containing the prefix and token
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue