|
Lines 133-139
Link Here
|
| 133 |
self._auth_response = umcp.Response( request ) |
133 |
self._auth_response = umcp.Response( request ) |
| 134 |
self._auth_response.body['sessionid'] = request.body.get('sessionid','') |
134 |
self._auth_response.body['sessionid'] = request.body.get('sessionid','') |
| 135 |
self._auth_response_queue = response_queue |
135 |
self._auth_response_queue = response_queue |
| 136 |
self.client.authenticate( request.body[ 'username' ], request.body[ 'password' ], request.body[ 'new_password' ] ) |
136 |
self.client.authenticate( **request.body ) |
| 137 |
|
137 |
|
| 138 |
def _response(self, response): |
138 |
def _response(self, response): |
| 139 |
"""Queue response from UMC server.""" |
139 |
"""Queue response from UMC server.""" |
|
Lines 553-566
Link Here
|
| 553 |
body = cherrypy.request.body.read() |
553 |
body = cherrypy.request.body.read() |
| 554 |
|
554 |
|
| 555 |
json = self.load_json(body) |
555 |
json = self.load_json(body) |
| 556 |
|
|
|
| 557 |
CORE.info('CPRoot/command: request: command=%s' % cherrypy.request.path_info ) |
556 |
CORE.info('CPRoot/command: request: command=%s' % cherrypy.request.path_info ) |
| 558 |
|
557 |
|
| 559 |
# create new UMCP request |
558 |
# create new UMCP request |
| 560 |
req = umcp.Request( 'AUTH' ) |
559 |
req = umcp.Request( 'AUTH' ) |
| 561 |
req.body[ 'username' ] = json[ 'options' ].get('username','') |
560 |
json['options'].setdefault('password', '') |
| 562 |
req.body[ 'password' ] = json[ 'options' ].get('password','') |
561 |
json['options'].setdefault('username', '') |
| 563 |
req.body[ 'new_password' ] = json[ 'options' ].get('new_password') |
562 |
json['options'].setdefault('new_password', '') |
|
|
563 |
req.body.update(json['options']) |
| 564 |
|
564 |
|
| 565 |
# create new response queue |
565 |
# create new response queue |
| 566 |
response_queue = Queue.Queue() |
566 |
response_queue = Queue.Queue() |