Advertisement
Guest User

Bypass twoface

a guest
May 14th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. if (this.m_TwoFactorModal) {
  2. $J.post( this.m_strBaseURL + 'api/login', this.GetParameters( { /*withError: true,*/ username: username, password: password, '2factor': $J('#twofactorcode_entry').val() } ) )
  3. .done( $J.proxy( this.OnRSAKeyResponse, this ) )
  4. .fail( function (xhr) {
  5. $J('#login_btn_signin').show();
  6. $J('#login_btn_wait').hide();
  7. _this.m_bLoginInFlight = false;
  8.  
  9. switch (xhr.status) {
  10. case 403:
  11. var error = JSON.parse(xhr.responseText).Error
  12. if (error === '2factor') {
  13. _this.SetTwoFactorAuthModalState("incorrectcode");
  14. } else {
  15. _this.m_TwoFactorModal.Dismiss();
  16. _this.CancelTwoFactorAuthProcess();
  17. ShowAlertDialog(custLang[currCustLang].error, custLang[currCustLang].problem);
  18. }
  19. break;
  20.  
  21. default:
  22. _this.m_TwoFactorModal.Dismiss();
  23. _this.CancelTwoFactorAuthProcess();
  24. ShowAlertDialog(custLang[currCustLang].error, custLang[currCustLang].problem);
  25. break;
  26. }
  27. });
  28. } else {
  29. this.OnAuthCodeResponse()
  30. }
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement