Adds the description for the authentication.

enhance/v120
Hieromon Ikasamo 5 years ago
parent 06982c4ec8
commit 140d1f8768
  1. 17
      mkdocs/apiaux.md
  2. 25
      mkdocs/apiconfig.md

@ -42,6 +42,21 @@ Add an element to the AutoConnectAux. An added element is displayed on the custo
<dd><span class="apidef">addons</span><span class="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> <dd><span class="apidef">addons</span><span class="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>
</dl> </dl>
### <i class="fa fa-caret-right"></i> authentication
```cpp
void authentication(const AC_AUTH_t auth)
```
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.
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">auth</span><span class="apidesc">Specifies authentication scheme with the following enumeration value.
- **AC_AUTH_BASIC** : Basic scheme.
- **AC_AUTH_DIGEST** : Digest scheme.
</span></dd>
</dl>
### <i class="fa fa-caret-right"></i> fetchElement ### <i class="fa fa-caret-right"></i> fetchElement
```cpp ```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. - Stream : An entity that inherits stream class, generally SPIFFS or SD.
</span></dd> </span></dd>
<dd><span class="apidef">name</span><span class="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><span class="apidef">name</span><span class="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><span class="apidef">names</span><span class="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><span class="apidef">names</span><span class="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>
<dt>**Return value**</dt> <dt>**Return value**</dt>
<dd><span class="apidef">true</span><span class="apidesc">Specified AutoConnectElements successfully loaded.</span></dd> <dd><span class="apidef">true</span><span class="apidesc">Specified AutoConnectElements successfully loaded.</span></dd>
<dd><span class="apidef">false</span><span class="apidesc">JSON document loading failed.</span></dd> <dd><span class="apidef">false</span><span class="apidesc">JSON document loading failed.</span></dd>

@ -40,6 +40,31 @@ Sets IP address for Soft AP in captive portal. When AutoConnect fails the initia
<dd><span class="apidef">IPAddress</span><span class="apidesc">The default value is **172.217.28.1**</span></dd> <dd><span class="apidef">IPAddress</span><span class="apidesc">The default value is **172.217.28.1**</span></dd>
</dl> </dl>
### <i class="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.
<dl class="apidl">
<dt>**Type**</dt>
<dd>AC_AUTH_t</dd>
<dt>**Value**</dt>
<dd><span class="apidef">AC_AUTH_NONE</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">No authentication. This is the default.</span></dd>
<dd><span class="apidef">AC_AUTH_DIGEST</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Use the [digest scheme](https://tools.ietf.org/html/rfc2617#section-3).</span></dd>
<dd><span class="apidef">AC_AUTH_BASIC</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Use the [basic scheme](https://tools.ietf.org/html/rfc2617#section-2).</span></dd>
</dl>
### <i class="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.
<dl class="apidl">
<dt>**Type**</dt>
<dd>AC_AUTHSCOPE_t</dd>
<dt>**Value**</dt>
<dd><span class="apidef">AC_AUTHSCOPE_AUX</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Require authentication to access for all custom Web pages, excepting AutoConnect's pages. This is the Default.</span></dd>
<dd><span class="apidef">AC_AUTHSCOPE_PARTIAL</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Authenticate only specific custom Web pages which are specified by [AutoConnectAux::authentication](apiaux.md#authentication) function or JSON description.</span></dd>
<dd><span class="apidef">AC_AUTHSCOPE_PORTAL</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Require authentication to access for all AutoConnect's pages, including custom Web pages.</span></dd>
</dl>
### <i class="fa fa-caret-right"></i> autoReconnect ### <i class="fa fa-caret-right"></i> autoReconnect
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. 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.

Loading…
Cancel
Save