Commit b8ae8bef authored by Rafael Monnerat's avatar Rafael Monnerat

ERP5Security: getExternalLogin should return login instead user_id

  The implementation of external_login expects the reference of an Login object and the portal type of itself
parent cf4d90b6
......@@ -78,15 +78,17 @@ class ERP5AccessTokenExtractionPlugin(BasePlugin):
external_login = None
method = token_document._getTypeBasedMethod('getExternalLogin')
if method is not None:
external_login = method()
external_login, login_portal_type = method()
if external_login is not None:
creds['external_login'] = external_login
creds['login_portal_type'] = login_portal_type
creds['remote_host'] = request.get('REMOTE_HOST', '')
try:
creds['remote_address'] = request.getClientAddr()
except AttributeError:
creds['remote_address'] = request.get('REMOTE_ADDR', '')
return creds
#Form for new plugin in ZMI
......
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