Changeset 1642 for trunk/packages
- Timestamp:
- Nov 14, 2008, 3:39:21 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-web/code/main.py
r1634 r1642 653 653 def getUser(environ): 654 654 """Return the current user based on the SSL environment variables""" 655 return environ.get('REMOTE_USER', None) 655 user = environ.get('REMOTE_USER') 656 if user is None: 657 return 658 659 if environ.get('AUTH_TYPE') == 'Negotiate': 660 # Convert the krb5 principal into a krb4 username 661 if not user.endswith('@%s' % config.authn[0].realm): 662 return 663 else: 664 return user.split('@')[0].replace('/', '.') 665 else: 666 return user 656 667 657 668 def handler(username, state, path, fields):
Note: See TracChangeset
for help on using the changeset viewer.