2323public class WebServiceHandler {
2424 private Activity activity_apr ;
2525 // Genera un token único en tu aplicación
26- String token = "oPGP8M*jmePkYRnmnxU2v%TgJ&V9r4VfZv6q&LLe%q!c#3U84KWi5x9K9m$W^nVWkZzECTj64wyErbQ7u$B7J#j8m*&gK@Hc!oN$WZwkS5RmADYKLqiLFBXLaTNLKytd " ;
26+ // String token = "oPGP8M*jmePkYRnmnxU2v%TgJ&V9r4VfZv6q&LLe%q!c#3U84KWi5x9K9m";
2727
2828 public WebServiceHandler (Activity activity ) {
2929 this .activity_apr = activity ;
@@ -35,7 +35,7 @@ public class ValidarUsuario extends AsyncTask<String, Void, String[]> {
3535 protected String [] doInBackground (String ... params ) {
3636 String usuario_apr = params [0 ];
3737 String contrasena_apr = params [1 ];
38- String urlString_apr = "http://simpleloginapp.duckdns.org /validacuenta.php" ;
38+ String urlString_apr = "http://127.0.0.1 /validacuenta.php" ;
3939 //"http://192.168.1.227/validacuenta.php";
4040
4141 String resultado_apr = null ;
@@ -48,7 +48,7 @@ protected String[] doInBackground(String... params) {
4848 conexion .setDoOutput (true );
4949
5050 // Agrega el token como cabecera a la solicitud, COMENTAR ESTA LÍNEA PARA PROBAR LA APP EN SERVER PROPIO
51- conexion .setRequestProperty ("Authorization" , "Bearer " + token );
51+ // conexion.setRequestProperty("Authorization", "Bearer " + token);
5252
5353 // Crear los datos del formulario
5454 String datos = "usuario=" + URLEncoder .encode (usuario_apr , "UTF-8" ) + "&contrasena=" + URLEncoder .encode (contrasena_apr , "UTF-8" );
@@ -137,7 +137,7 @@ protected void onPostExecute(String[] resultadoYDatos) {
137137 }
138138
139139 public List <User > consultarUsuarios () {
140- String urlString_apr = "http://simpleloginapp.duckdns.org/consultarusuarios .php" ;
140+ String urlString_apr = "http://127.0.0.1/validacuenta .php" ;
141141 //"http://192.168.1.227/consultarusuarios.php";
142142 List <User > usuarios_apr = new ArrayList <>();
143143
@@ -149,7 +149,7 @@ public List<User> consultarUsuarios() {
149149 conexion .setRequestMethod ("GET" );
150150
151151 // Agrega el token como cabecera a la solicitud, COMENTAR ESTA LÍNEA PARA PROBAR LA APP EN SERVER PROPIO
152- conexion .setRequestProperty ("Authorization" , "Bearer " + token );
152+ // conexion.setRequestProperty("Authorization", "Bearer " + token);
153153
154154 // Leer la respuesta del servidor
155155 InputStream entrada = conexion .getInputStream ();
0 commit comments