From 140d1f8768ee4af767c9e4a9cd3d8235385fabf0 Mon Sep 17 00:00:00 2001 From: Hieromon Ikasamo Date: Fri, 15 May 2020 02:50:04 +0900 Subject: [PATCH] Adds the description for the authentication. --- mkdocs/apiaux.md | 17 ++++++++++++++++- mkdocs/apiconfig.md | 25 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/mkdocs/apiaux.md b/mkdocs/apiaux.md index 82e940a..892e14f 100644 --- a/mkdocs/apiaux.md +++ b/mkdocs/apiaux.md @@ -42,6 +42,21 @@ Add an element to the AutoConnectAux. An added element is displayed on the custo
addonsAn 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>`.
+### 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. +
+
**Parameters**
+
authSpecifies authentication scheme with the following enumeration value. + +- **AC_AUTH_BASIC** : Basic scheme. +- **AC_AUTH_DIGEST** : Digest scheme. +
+
+ ### 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.
nameSpecifies the name to be load. If the name is not specified, the loadElement function will load all elements contained in the JSON document.
-
names 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.
+
names 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.
**Return value**
trueSpecified AutoConnectElements successfully loaded.
falseJSON document loading failed.
diff --git a/mkdocs/apiconfig.md b/mkdocs/apiconfig.md index a42267f..676605e 100644 --- a/mkdocs/apiconfig.md +++ b/mkdocs/apiconfig.md @@ -40,6 +40,31 @@ Sets IP address for Soft AP in captive portal. When AutoConnect fails the initia
IPAddressThe default value is **172.217.28.1**
+### 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. +
+
**Type**
+
AC_AUTH_t
+
**Value**
+
AC_AUTH_NONE No authentication. This is the default.
+
AC_AUTH_DIGEST Use the [digest scheme](https://tools.ietf.org/html/rfc2617#section-3).
+
AC_AUTH_BASIC Use the [basic scheme](https://tools.ietf.org/html/rfc2617#section-2).
+
+ +### 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. +
+
**Type**
+
AC_AUTHSCOPE_t
+
**Value**
+
AC_AUTHSCOPE_AUX Require authentication to access for all custom Web pages, excepting AutoConnect's pages. This is the Default.
+
AC_AUTHSCOPE_PARTIAL Authenticate only specific custom Web pages which are specified by [AutoConnectAux::authentication](apiaux.md#authentication) function or JSON description.
+
AC_AUTHSCOPE_PORTAL Require authentication to access for all AutoConnect's pages, including custom Web pages.
+
+ ### 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.