1/**Validar boton captcha*/ 2function boton(google) { 3 if (google){ 4 $("#btn-acceder").attr("disabled", false); 5 } 6} 7/*validar si el usuario se encuentra en el sistema*/ 8var control = false; 9function googleSession(googleResponse) { 10 if (control) { 11 let googleData = {}; 12 let buttonSigninGoogle = $("#sign-in-google"); 13 let inputToken = $("#sxSession:hidden"); 14 googleData['id_token'] = googleResponse.credential; 15 googleData['sxToken'] = buttonSigninGoogle.data('token-get-data-user'); 16 let url = buttonSigninGoogle.data('url-get-data-user'); 17 $.ajax({ 18 url: url, 19 type: 'post', 20 data: googleData, 21 dataType: 'json', 22 async: false, 23 }) 24 .done((response) => { 25 if (!response.error) { 26 let datos = {}; 27 datos['typeLogin'] = 'google'; 28 datos['loginUsuario'] = response.email; 29 datos['passwdCheck'] = response.uid; 30 datos['nombre'] = response.given_name; 31 datos['apellido'] = response.family_name; 32 datos['sxToken'] = inputToken.val(); 33 let url = buttonSigninGoogle.data('login'); 34 $.ajax({ 35 url: url, 36 type: 'post', 37 data: datos, 38 dataType: 'html', 39 async: false 40 }) 41 .done(function () { 42 window.location.replace(buttonSigninGoogle.data('redirection')); 43 }) 44 .fail(function () { 45 console.log('Failure sign in with Google'); 46 nxModal({messageText: buttonSigninGoogle.data('msg-error-sign-in')}); 47 }); 48 } else { 49 console.log(response.detail); 50 nxModal({messageText: buttonSigninGoogle.data('msg-error-sign-in')}); 51 } 52 }) 53 .fail(function () { 54 console.log('Failure getting user information'); 55 nxModal({messageText: buttonSigninGoogle.data('msg-error-sign-in')}); 56 }); 57 } 58} 59/*flag de control para indicar que desea iniciar sesión*/ 60function onSignInGoogle() { 61 control = true; 62}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.