Commit a77bb366 authored by Sylvain Thénault's avatar Sylvain Thénault

update authentication component to cw 3.10 api

parent aa97e8717011
......@@ -50,6 +50,20 @@ class XRemoteUserRetriever(authentication.WebAuthInfoRetreiver):
self.debug('web authenticator running post authentication callback')
cnx.krb_and_cwuser = 'password' not in authinfo
def request_has_auth_info(self, req):
try:
login, realm = req.get_header('x-remote-user', None).split('@')
except Exception:
return False
return True
def revalidate_login(self):
try:
login, realm = req.get_header('x-remote-user', None).split('@')
except Exception:
return None
return login
@objectify_selector
def kerberos_authenticated(cls, req, rset=None, **kwargs):
if hasattr(req.cnx, 'krb_and_cwuser') and req.cnx.krb_and_cwuser:
......
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