Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (this.m_TwoFactorModal) {
- $J.post( this.m_strBaseURL + 'api/login', this.GetParameters( { /*withError: true,*/ username: username, password: password, '2factor': $J('#twofactorcode_entry').val() } ) )
- .done( $J.proxy( this.OnRSAKeyResponse, this ) )
- .fail( function (xhr) {
- $J('#login_btn_signin').show();
- $J('#login_btn_wait').hide();
- _this.m_bLoginInFlight = false;
- switch (xhr.status) {
- case 403:
- var error = JSON.parse(xhr.responseText).Error
- if (error === '2factor') {
- _this.SetTwoFactorAuthModalState("incorrectcode");
- } else {
- _this.m_TwoFactorModal.Dismiss();
- _this.CancelTwoFactorAuthProcess();
- ShowAlertDialog(custLang[currCustLang].error, custLang[currCustLang].problem);
- }
- break;
- default:
- _this.m_TwoFactorModal.Dismiss();
- _this.CancelTwoFactorAuthProcess();
- ShowAlertDialog(custLang[currCustLang].error, custLang[currCustLang].problem);
- break;
- }
- });
- } else {
- this.OnAuthCodeResponse()
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement