Exemplo n.º 1
0
 def _onLoginRejected(self, loginStatus, responseData):
     socialList = g_loginManager.getAvailableSocialNetworks()
     if self.__lastLoginType in socialList and loginStatus == LOGIN_STATUS.LOGIN_REJECTED_INVALID_PASSWORD:
         Waiting.hide('login')
         g_loginManager.clearToken2Preference()
         self._showForm()
         self.as_setErrorMessageS(_ms('#menu:login/status/SOCIAL_SESSION_END'), INVALID_FIELDS.PWD_INVALID)
         self._dropLoginQueue(loginStatus)
     else:
         super(SocialLoginView, self)._onLoginRejected(loginStatus, responseData)
Exemplo n.º 2
0
 def _showForm(self):
     socialList = g_loginManager.getAvailableSocialNetworks()
     if self.__lastLoginType in socialList and self._rememberUser:
         self.as_showSocialFormS(
             len(g_loginManager.getPreference('token2')) != 0,
             self.__userName,
             makeHtmlString('html_templates:socialNetworkLogin',
                            'transparentLogo',
                            {'socialNetwork': self.__lastLoginType}),
             self.__lastLoginType)
     else:
         self.as_showSimpleFormS(True, self.__setSocialDataList(socialList))
Exemplo n.º 3
0
 def _showForm(self):
     socialList = g_loginManager.getAvailableSocialNetworks()
     if self.__lastLoginType in socialList and self._rememberUser:
         self.as_showSocialFormS(
             len(g_loginManager.getPreference("token2")) != 0,
             self.__userName,
             makeHtmlString(
                 "html_templates:socialNetworkLogin", "transparentLogo", {"socialNetwork": self.__lastLoginType}
             ),
             self.__lastLoginType,
         )
     else:
         self.as_showSimpleFormS(True, self.__setSocialDataList(socialList))
Exemplo n.º 4
0
 def _onLoginRejected(self, loginStatus, responseData):
     socialList = g_loginManager.getAvailableSocialNetworks()
     if self.__lastLoginType in socialList and (
             loginStatus == LOGIN_STATUS.SESSION_END or loginStatus
             == LOGIN_STATUS.LOGIN_REJECTED_INVALID_PASSWORD):
         Waiting.hide('login')
         g_loginManager.clearToken2Preference()
         self._showForm()
         self.as_setErrorMessageS(
             _ms('#menu:login/status/SOCIAL_SESSION_END'),
             INVALID_FIELDS.PWD_INVALID)
         self._dropLoginQueue(loginStatus)
     else:
         super(SocialLoginView,
               self)._onLoginRejected(loginStatus, responseData)