How can I connect my Arduino(with ESP8266) to WiFi which has SSID, and requires

same as on phone. first you connect to the WiFi network without password. then you send a https request with credentials