~justin-fathomdb/nova/justinsb-openstack-api-volumes

« back to all changes in this revision

Viewing changes to nova/api/openstack/auth.py

  • Committer: Justin Santa Barbara
  • Date: 2011-02-23 01:21:32 UTC
  • mfrom: (700.3.17 fix-fake-rabbit)
  • Revision ID: justin@fathomdb.com-20110223012132-9sl6jq28a3adtju6
Merged with fake-rabbit fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import hashlib
20
20
import json
21
21
import time
22
 
import logging
23
22
 
24
23
import webob.exc
25
24
import webob.dec
121
120
        req - webob.Request object
122
121
        """
123
122
        ctxt = context.get_admin_context()
124
 
        user = self.auth.get_user_from_access_key(key)
125
 
        if user and user.name == username:
 
123
        user = self.auth.get_user_from_access_key(username)
 
124
        if user and user.secret == key:
126
125
            token_hash = hashlib.sha1('%s%s%f' % (username, key,
127
126
                time.time())).hexdigest()
128
127
            token_dict = {}