@ -42,6 +42,21 @@ Add an element to the AutoConnectAux. An added element is displayed on the custo
<dd><spanclass="apidef">addons</span><spanclass="apidesc">An array list of reference of AutoConnectElements. The [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization) with braced-init-list of the [std::vector](https://en.cppreference.com/w/cpp/container/vector) can be used for the addons parameter cause the actual definition of type **AutoConnectElementVT** is `std::vector<std::reference_wrapper<AutoConnectElement>>`.</span></dd>
Set to require authentication with access to a page. When you access a page that requires authentication, HTTP authentication will be performed according to the scheme specified with the auth parameter.
<dlclass="apidl">
<dt>**Parameters**</dt>
<dd><spanclass="apidef">auth</span><spanclass="apidesc">Specifies authentication scheme with the following enumeration value.
- **AC_AUTH_BASIC** : Basic scheme.
- **AC_AUTH_DIGEST** : Digest scheme.
</span></dd>
</dl>
### <iclass="fa fa-caret-right"></i> fetchElement
```cpp
@ -179,7 +194,7 @@ Load specified element from JSON document into AutoConnectAux. The JSON document
- Stream : An entity that inherits stream class, generally SPIFFS or SD.
</span></dd>
<dd><spanclass="apidef">name</span><spanclass="apidesc">Specifies the name to be load. If the name is not specified, the loadElement function will load all elements contained in the JSON document.</span></dd>
<dd><spanclass="apidef">names</span><spanclass="apidesc"> Spefifies an array list of String indicating the name of the element to be loaded. The [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization) with braced-init-list of the [std::vector](https://en.cppreference.com/w/cpp/container/vector) can be used.</span></dd>
<dd><spanclass="apidef">names</span><spanclass="apidesc"> Specifies an array list of String indicating the name of the element to be loaded. The [list initialization](https://en.cppreference.com/w/cpp/language/list_initialization) with braced-init-list of the [std::vector](https://en.cppreference.com/w/cpp/container/vector) can be used.</span></dd>
@ -40,6 +40,31 @@ Sets IP address for Soft AP in captive portal. When AutoConnect fails the initia
<dd><spanclass="apidef">IPAddress</span><spanclass="apidesc">The default value is **172.217.28.1**</span></dd>
</dl>
### <iclass="fa fa-caret-right"></i> auth
Apply HTTP authentication with the AutoConnect web page. This This setting allows the Sketch to authenticate with "BASIC" or "DIGEST" scheme. It is given as an enumeration value of **AC_AUTH_t** that indicates the authentication scheme.
This setting determines the default scheme for HTTP authentication with AutoConnect. When the [**AutoConnectConfig::authScope**](#authscope) is **AC_AUTHSCOPE_PARTIAL**, each [AutoConnectAux authentication](apiaux.md#authentication) scheme has priority.
<dlclass="apidl">
<dt>**Type**</dt>
<dd>AC_AUTH_t</dd>
<dt>**Value**</dt>
<dd><spanclass="apidef">AC_AUTH_NONE</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">No authentication. This is the default.</span></dd>
<dd><spanclass="apidef">AC_AUTH_DIGEST</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">Use the [digest scheme](https://tools.ietf.org/html/rfc2617#section-3).</span></dd>
<dd><spanclass="apidef">AC_AUTH_BASIC</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">Use the [basic scheme](https://tools.ietf.org/html/rfc2617#section-2).</span></dd>
</dl>
### <iclass="fa fa-caret-right"></i> authScope
Specifies the authentication scope of AutoConnect Web pages. The Sketch will be able to expand or narrow the range of authentication by this setting, which can be either as **AC_AUTHSCOPE_t** enumeration value.
<dlclass="apidl">
<dt>**Type**</dt>
<dd>AC_AUTHSCOPE_t</dd>
<dt>**Value**</dt>
<dd><spanclass="apidef">AC_AUTHSCOPE_AUX</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">Require authentication to access for all custom Web pages, excepting AutoConnect's pages. This is the Default.</span></dd>
<dd><spanclass="apidef">AC_AUTHSCOPE_PARTIAL</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">Authenticate only specific custom Web pages which are specified by [AutoConnectAux::authentication](apiaux.md#authentication) function or JSON description.</span></dd>
<dd><spanclass="apidef">AC_AUTHSCOPE_PORTAL</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">Require authentication to access for all AutoConnect's pages, including custom Web pages.</span></dd>
Automatically will try to reconnect with the past established access point (BSSID) when the current configured SSID in ESP8266/ESP32 could not be connected. By enabling this option, *AutoConnect::begin()* function will attempt to reconnect to a known access point using credentials stored in the flash, even if the connection failed by current SSID.