ESP32 | Adding Basic HTTP Authentication to your Web Server | Out of the box IoT

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2020
  • Mish Mash Labs present How to Add Authentication to your Web Server hosted by an Espressif Systems ESP32. We'll first add the changes to the program to add the authentication. Then I'll show you how to change the user name and password.
    This works on Arduino too!
    This video is a continuation of a previous video - Set up as a Web Server and Control IO Pins:
    • ESP32 | Set up a HTTP ...
    And the sketches are available here:
    github.com/mishmashlabs/ESP32...
    #ESP32 #ESP8266 #Arduino #Authentication #tutorial #mishmash
    Instagram: mishmashlabs
    Twitter: mishmashlabs/
    Music Credits:
    Intro & Outro by audionautix.com

ความคิดเห็น • 45

  • @tenapier
    @tenapier 3 ปีที่แล้ว +3

    This is incredibly good! Thank you so much!!

  • @poruatokin
    @poruatokin 2 ปีที่แล้ว +1

    Excellent!!

  • @binisol7353
    @binisol7353 2 ปีที่แล้ว +2

    Great, although it keeps reloading to the login window even after i enter the right credentials

  • @chiefrunningfist
    @chiefrunningfist 3 ปีที่แล้ว

    Can you type in the ON/OFF state URL and bypass the authentication?

  • @silexalger1284
    @silexalger1284 3 ปีที่แล้ว

    Before I wish you hello from Algeria and thank you very much for your sharing which will surely help a lot of people. I followed your video to the letter unfortunately at the end when I connect with my address it does not ask me for the name of the user or the password it opens directly. I look forward to your help. thank you in advance

  • @user-xe2wv8em5k
    @user-xe2wv8em5k ปีที่แล้ว

    hello how to create a button on the web page to decouple thank

  • @AMBIN-tt8wi
    @AMBIN-tt8wi 6 หลายเดือนก่อน

    Is it possible to make different accounts for different purpose?

  • @cenation606
    @cenation606 2 ปีที่แล้ว

    How can I trigger the logout to this one?

  • @user-dy2wm9er3q
    @user-dy2wm9er3q 2 ปีที่แล้ว

    I need your help
    I want this encryption method
    Add to

  • @jaywardhanpandit
    @jaywardhanpandit 3 ปีที่แล้ว

    Hi nice project and worked fine when i tested it. can you please make code how to log out the server.

  • @sg8nj
    @sg8nj ปีที่แล้ว

    Is it possible without hard coded ?

  • @chibingwei761
    @chibingwei761 ปีที่แล้ว +1

    bro did you have a demo video register page to continue for this project?

    • @MishMashLabs
      @MishMashLabs  ปีที่แล้ว

      There's isn't one, the user is defined in the code

    • @chibingwei761
      @chibingwei761 ปีที่แล้ว

      @@MishMashLabs ok thank you

  • @craiginboro679
    @craiginboro679 3 ปีที่แล้ว +1

    Any ideas on how to run your code and pull in the date and time from Internet?

    • @MishMashLabs
      @MishMashLabs  3 ปีที่แล้ว +2

      Here is a function you can call, also install and import the library 'time'
      #include "time.h"
      then set the server, gmt offset adn delaylight savings offset:
      const char* ntpServer = "pool.ntp.org";
      const long gmtOffset_sec = 0;
      const int daylightOffset_sec = 3600;
      configure the settings in your setup loop
      configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
      and call the function in the mail loop:
      printLocalTime()
      Heres the function to paste at the end of your code:
      void printLocalTime(){
      struct tm timeinfo;
      if(!getLocalTime(&timeinfo)){
      Serial.println("Failed to obtain time");
      return;
      }
      Serial.println(&timeinfo, "%A, %B %d %Y %H:%M:%S");
      Serial.print("Day of week: ");
      Serial.println(&timeinfo, "%A");
      Serial.print("Month: ");
      Serial.println(&timeinfo, "%B");
      Serial.print("Day of Month: ");
      Serial.println(&timeinfo, "%d");
      Serial.print("Year: ");
      Serial.println(&timeinfo, "%Y");
      Serial.print("Hour: ");
      Serial.println(&timeinfo, "%H");
      Serial.print("Hour (12 hour format): ");
      Serial.println(&timeinfo, "%I");
      Serial.print("Minute: ");
      Serial.println(&timeinfo, "%M");
      Serial.print("Second: ");
      Serial.println(&timeinfo, "%S");
      Serial.println("Time variables");
      char timeHour[3];
      strftime(timeHour,3, "%H", &timeinfo);
      Serial.println(timeHour);
      char timeWeekDay[10];
      strftime(timeWeekDay,10, "%A", &timeinfo);
      Serial.println(timeWeekDay);
      Serial.println();
      }

    • @craiginboro679
      @craiginboro679 3 ปีที่แล้ว

      @@MishMashLabs
      Thank you so much, I will crack on testing in the next few days.

    • @sg8nj
      @sg8nj ปีที่แล้ว

      @@MishMashLabs thanks

  • @MultiVincent79
    @MultiVincent79 3 ปีที่แล้ว

    Are you accessing that using local area network or WAN?

    • @MishMashLabs
      @MishMashLabs  3 ปีที่แล้ว

      This project was done one LAN, but it would the same on a WAN, only problem might be network configuration, and firewalls closing ports.

  • @KAJO360
    @KAJO360 3 ปีที่แล้ว +1

    Good

  • @caionggabriel607
    @caionggabriel607 11 หลายเดือนก่อน

    Code of how show temperature?

  • @user-dy2wm9er3q
    @user-dy2wm9er3q 2 ปีที่แล้ว

    Esp32cam Is it possible

  • @zaqwsx28
    @zaqwsx28 3 ปีที่แล้ว

    How does this work in esp32 cam?

    • @MishMashLabs
      @MishMashLabs  3 ปีที่แล้ว

      Can you paste your code? or drop get in touch on facebook.
      facebook.com/mishmashlabs/

  • @axelwupper1438
    @axelwupper1438 2 ปีที่แล้ว

    Hallo, this is perfekt. I nee this for controll samthing. But i need for ohne switch an automaticel switch back to off. You know what i meen? In German it calls "Taster" can you help me please?

    • @MishMashLabs
      @MishMashLabs  2 ปีที่แล้ว

      Do you mean a momentary switch that doesn't latch?

    • @axelwupper1438
      @axelwupper1438 2 ปีที่แล้ว

      @@MishMashLabs yes

  • @axelwupper1438
    @axelwupper1438 2 ปีที่แล้ว

    I mean i need 1 momentary Switch vor 1sec an than automatikly off and 1 normal switch from your Code. Please help me

    • @MishMashLabs
      @MishMashLabs  2 ปีที่แล้ว

      Yes you just need to set a turn the output high once the button is pressed and then a sleep for 1 second, before setting the output as low.

    • @axelwupper1438
      @axelwupper1438 2 ปีที่แล้ว

      @@MishMashLabs thx, can you make me the Code?

    • @MishMashLabs
      @MishMashLabs  2 ปีที่แล้ว +1

      @@axelwupper1438 unfortunately I'm very busy with other projects until the end of the year. Best of luck. If you try and have a small bug you can message me on Facebook for help.

    • @axelwupper1438
      @axelwupper1438 2 ปีที่แล้ว

      @@MishMashLabs ok , i have testet to make under gpio settings that when it switcht high delay switcht low but when i reload the HTML then it switcht on off and this is Not good. I havnt Facebook. Only insta and there i have write you. Have you an example for the sleep Code that i can Google it?

  • @qazaq6893
    @qazaq6893 10 หลายเดือนก่อน

    This is a script belong to Rui Santos isn’t it?

  • @user-dy2wm9er3q
    @user-dy2wm9er3q 2 ปีที่แล้ว

    Esp32 cam Is it possible

  • @kamalkamel7559
    @kamalkamel7559 3 ปีที่แล้ว +1

    THE CODE ITS NOT FOUND

    • @MishMashLabs
      @MishMashLabs  3 ปีที่แล้ว +1

      Thanks for pointing this out. The link has been fixed now!

    • @kamalkamel7559
      @kamalkamel7559 3 ปีที่แล้ว

      @@MishMashLabs thankyou

  • @user-dy2wm9er3q
    @user-dy2wm9er3q 2 ปีที่แล้ว

    Next, can I add a password to the program?

    • @MishMashLabs
      @MishMashLabs  2 ปีที่แล้ว

      Sure! Head to our Facebook page. We offer consultancy services at competive rates!

  • @Looki2000
    @Looki2000 หลายเดือนก่อน

    Password authentication on an unencrypted HTTP connection is a complete nonsense. Anyone in your network (or in the world if you port forward) can intercept the traffic and steal your password.