Exemple #1
0
 def POST_resend_verification_email(self, i):
     try:
         accounts.login(i.username, i.password)
     except ClientException, e:
         code = e.get_data().get("code")
         if code != "account_not_verified":
             return self.error("account_incorrect_password", i)
Exemple #2
0
 def POST_resend_verification_email(self, i):
     try:
         accounts.login(i.username, i.password)
     except ClientException, e:
         code = e.get_data().get("code")
         if code != "account_not_verified":
             return self.error("account_incorrect_password", i)
Exemple #3
0
 def login(self, auth_str):
     if not auth_str:
         raise self.auth_failed("No credentials provided")
     auth_str = auth_str.replace("Basic ", "")
     try:
         auth_str = base64.decodebytes(bytes(auth_str, 'utf-8'))
         auth_str = auth_str.decode('utf-8')
     except AttributeError:
         auth_str = base64.decodestring(auth_str)
     username, password = auth_str.split(':')
     accounts.login(username, password)
Exemple #4
0
 def login(self, auth_str):
     if not auth_str:
         return
     auth_str = auth_str.replace("Basic ", "")
     try:
         auth_str = base64.decodebytes(bytes(auth_str, 'utf-8'))
         auth_str = auth_str.decode('utf-8')
     except AttributeError:
         auth_str = base64.decodestring(auth_str)
     username, password = auth_str.split(':')
     accounts.login(username, password)
Exemple #5
0
 def login(self, authstring):
     if not authstring:
         raise self.auth_failed("No credentials provided")
     authstring = authstring.replace("Basic ","")
     username, password = base64.decodestring(authstring).split(':')
     accounts.login(username, password)
Exemple #6
0
 def login(self, authstring):
     if not authstring:
         return
     authstring = authstring.replace("Basic ","")
     username, password = base64.decodestring(authstring).split(':')
     accounts.login(username, password)