Commit f0e8c162 authored by Titouan Soulard's avatar Titouan Soulard

erp5_oauth2_authorisation: remove unnecessary access to session

`createSession` method from the OAuth2 Authorisation Server Connector needs
to access client value. Fetching this value from the session is not needed
since it is already stored in a local variable.
parent 36768696
......@@ -687,7 +687,6 @@ class _ERP5RequestValidator(RequestValidator):
def save_authorization_code(self, client_id, code, request, *args, **kwargs):
self._authorisation_server_connector_value.createSession(
authorisation_code=code['code'],
request=request,
client_value=request.client.erp5_client_value,
redirect_uri=request.redirect_uri,
scope_list=[
......@@ -1532,7 +1531,6 @@ class OAuth2AuthorisationServerConnector(XMLObject):
def createSession(
self,
authorisation_code,
request,
client_value,
redirect_uri,
scope_list,
......@@ -1570,7 +1568,7 @@ class OAuth2AuthorisationServerConnector(XMLObject):
code_challenge_method=code_challenge_method,
network_address=network_address,
user_agent=user_agent,
network_list=request.client.erp5_client_value.getNetworkList(),
network_list=client_value.getNetworkList(),
**kw
)
# XXX: use a non-draft state ?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment