Subversion Repositories SmartDukaan

Rev

Rev 785 | Rev 1274 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 785 Rev 884
Line 130... Line 130...
130
     - oldPassword
130
     - oldPassword
131
     - newPassword
131
     - newPassword
132
    """
132
    """
133
    pass
133
    pass
134
 
134
 
135
  def forgotPassword(self, email):
135
  def forgotPassword(self, email, newPassword):
136
    """
136
    """
137
    Parameters:
137
    Parameters:
138
     - email
138
     - email
-
 
139
     - newPassword
139
    """
140
    """
140
    pass
141
    pass
141
 
142
 
142
  def getAllAddressesForUser(self, userId):
143
  def getAllAddressesForUser(self, userId):
143
    """
144
    """
Line 857... Line 858...
857
      return result.success
858
      return result.success
858
    if result.ucx != None:
859
    if result.ucx != None:
859
      raise result.ucx
860
      raise result.ucx
860
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
861
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
861
 
862
 
862
  def forgotPassword(self, email):
863
  def forgotPassword(self, email, newPassword):
863
    """
864
    """
864
    Parameters:
865
    Parameters:
865
     - email
866
     - email
-
 
867
     - newPassword
866
    """
868
    """
867
    self.send_forgotPassword(email)
869
    self.send_forgotPassword(email, newPassword)
868
    return self.recv_forgotPassword()
870
    return self.recv_forgotPassword()
869
 
871
 
870
  def send_forgotPassword(self, email):
872
  def send_forgotPassword(self, email, newPassword):
871
    self._oprot.writeMessageBegin('forgotPassword', TMessageType.CALL, self._seqid)
873
    self._oprot.writeMessageBegin('forgotPassword', TMessageType.CALL, self._seqid)
872
    args = forgotPassword_args()
874
    args = forgotPassword_args()
873
    args.email = email
875
    args.email = email
-
 
876
    args.newPassword = newPassword
874
    args.write(self._oprot)
877
    args.write(self._oprot)
875
    self._oprot.writeMessageEnd()
878
    self._oprot.writeMessageEnd()
876
    self._oprot.trans.flush()
879
    self._oprot.trans.flush()
877
 
880
 
878
  def recv_forgotPassword(self, ):
881
  def recv_forgotPassword(self, ):
Line 2024... Line 2027...
2024
    args = forgotPassword_args()
2027
    args = forgotPassword_args()
2025
    args.read(iprot)
2028
    args.read(iprot)
2026
    iprot.readMessageEnd()
2029
    iprot.readMessageEnd()
2027
    result = forgotPassword_result()
2030
    result = forgotPassword_result()
2028
    try:
2031
    try:
2029
      result.success = self._handler.forgotPassword(args.email)
2032
      result.success = self._handler.forgotPassword(args.email, args.newPassword)
2030
    except UserContextException, ucx:
2033
    except UserContextException, ucx:
2031
      result.ucx = ucx
2034
      result.ucx = ucx
2032
    oprot.writeMessageBegin("forgotPassword", TMessageType.REPLY, seqid)
2035
    oprot.writeMessageBegin("forgotPassword", TMessageType.REPLY, seqid)
2033
    result.write(oprot)
2036
    result.write(oprot)
2034
    oprot.writeMessageEnd()
2037
    oprot.writeMessageEnd()
Line 4323... Line 4326...
4323
 
4326
 
4324
class forgotPassword_args:
4327
class forgotPassword_args:
4325
  """
4328
  """
4326
  Attributes:
4329
  Attributes:
4327
   - email
4330
   - email
-
 
4331
   - newPassword
4328
  """
4332
  """
4329
 
4333
 
4330
  thrift_spec = (
4334
  thrift_spec = (
4331
    None, # 0
4335
    None, # 0
4332
    (1, TType.STRING, 'email', None, None, ), # 1
4336
    (1, TType.STRING, 'email', None, None, ), # 1
-
 
4337
    (2, TType.STRING, 'newPassword', None, None, ), # 2
4333
  )
4338
  )
4334
 
4339
 
4335
  def __init__(self, email=None,):
4340
  def __init__(self, email=None, newPassword=None,):
4336
    self.email = email
4341
    self.email = email
-
 
4342
    self.newPassword = newPassword
4337
 
4343
 
4338
  def read(self, iprot):
4344
  def read(self, iprot):
4339
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4345
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4340
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4346
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4341
      return
4347
      return
Line 4347... Line 4353...
4347
      if fid == 1:
4353
      if fid == 1:
4348
        if ftype == TType.STRING:
4354
        if ftype == TType.STRING:
4349
          self.email = iprot.readString();
4355
          self.email = iprot.readString();
4350
        else:
4356
        else:
4351
          iprot.skip(ftype)
4357
          iprot.skip(ftype)
-
 
4358
      elif fid == 2:
-
 
4359
        if ftype == TType.STRING:
-
 
4360
          self.newPassword = iprot.readString();
-
 
4361
        else:
-
 
4362
          iprot.skip(ftype)
4352
      else:
4363
      else:
4353
        iprot.skip(ftype)
4364
        iprot.skip(ftype)
4354
      iprot.readFieldEnd()
4365
      iprot.readFieldEnd()
4355
    iprot.readStructEnd()
4366
    iprot.readStructEnd()
4356
 
4367
 
Line 4361... Line 4372...
4361
    oprot.writeStructBegin('forgotPassword_args')
4372
    oprot.writeStructBegin('forgotPassword_args')
4362
    if self.email != None:
4373
    if self.email != None:
4363
      oprot.writeFieldBegin('email', TType.STRING, 1)
4374
      oprot.writeFieldBegin('email', TType.STRING, 1)
4364
      oprot.writeString(self.email)
4375
      oprot.writeString(self.email)
4365
      oprot.writeFieldEnd()
4376
      oprot.writeFieldEnd()
-
 
4377
    if self.newPassword != None:
-
 
4378
      oprot.writeFieldBegin('newPassword', TType.STRING, 2)
-
 
4379
      oprot.writeString(self.newPassword)
-
 
4380
      oprot.writeFieldEnd()
4366
    oprot.writeFieldStop()
4381
    oprot.writeFieldStop()
4367
    oprot.writeStructEnd()
4382
    oprot.writeStructEnd()
4368
 
4383
 
4369
  def __repr__(self):
4384
  def __repr__(self):
4370
    L = ['%s=%r' % (key, value)
4385
    L = ['%s=%r' % (key, value)