#include <RemoteAuthentication.h>
An implementation of AuthenticationManager that stores it's values in EEPROM. It stores up to KEY_STORAGE_SIZE (default 6) key value pairs in EEPROM and checks directly against them without any buffering.
◆ initialise()
void EepromAuthenticatorManager::initialise |
( |
EepromAbstraction * |
eeprom, |
|
|
EepromPosition |
start, |
|
|
uint16_t |
magicKey = 0x9B32 |
|
) |
| |
Initialises the authenticator with an eeprom object, start position in the rom and optional magic key. the magic key is used to determine if the rom contains anything reasonable on startup. The default will probably be OK
- Parameters
-
eeprom | any eeprom abstraction from the IoAbstraction library |
start | position in the rom to start writing at |
magicKey | the value that is checked on load to see if stored data is trustworthy. |
◆ resetAllKeys()
void EepromAuthenticatorManager::resetAllKeys |
( |
| ) |
|
Reset all keys in this authenticator, such that all connections would need to run through the normal joining behaviour.
◆ changePin()
void EepromAuthenticatorManager::changePin |
( |
const char * |
newPin | ) |
|
Changes the current pin to a new pin
- Parameters
-
newPin | the new pin to save |
◆ copyPinToBuffer()
void EepromAuthenticatorManager::copyPinToBuffer |
( |
char * |
buffer, |
|
|
int |
size |
|
) |
| |
copies the current pin into the buffer provided.
- Parameters
-
buffer | the area to copy to |
size | the buffer size |
◆ copyKeyNameToBuffer()
void EepromAuthenticatorManager::copyKeyNameToBuffer |
( |
int |
idx, |
|
|
char * |
buffer, |
|
|
int |
bufSize |
|
) |
| |
Copy the name of the item at position idx into the provided buffer.
- Parameters
-
idx | the index to get the name of |
buffer | the buffer to copy into |
bufSize | size of buffer usually obtained from sizeof |
◆ addAdditionalUUIDKey()
bool EepromAuthenticatorManager::addAdditionalUUIDKey |
( |
const char * |
connectionName, |
|
|
const char * |
uuid |
|
) |
| |
|
overridevirtual |
Attempt to add an additional UUID to key mapping, may fail if there is not enough space to add another mapping.
- Parameters
-
connectionName | the name of the connection |
uuid | the key associated with it. |
Implements AuthenticationManager.
◆ isAuthenticated()
bool EepromAuthenticatorManager::isAuthenticated |
( |
const char * |
connectionName, |
|
|
const char * |
authResponse |
|
) |
| |
|
overridevirtual |
Check if the connectionName and authResponse match the one on record.
- Parameters
-
connectionName | the name of the connection |
authResponse | the key associated with it. |
Implements AuthenticationManager.
◆ doesPinMatch()
bool EepromAuthenticatorManager::doesPinMatch |
( |
const char * |
pinAttempt | ) |
|
|
overridevirtual |
Checks if the parameter pinAttempt matches with the one stored within this authentication class.
- Parameters
-
pinAttempt | the pin to be checked |
- Returns
- true if there is a match, otherwise false
Implements AuthenticationManager.
◆ getNumberOfEntries()
int EepromAuthenticatorManager::getNumberOfEntries |
( |
| ) |
const |
|
inline |
- Returns
- the number of spaces for entries in the eeprom
The documentation for this class was generated from the following files: