tcMenu
Public Member Functions | List of all members
AuthenticationManager Class Referenceabstract

#include <RemoteAuthentication.h>

Inheritance diagram for AuthenticationManager:
EepromAuthenticatorManager NoAuthenticationManager ReadOnlyAuthenticationManager

Public Member Functions

 AuthenticationManager (AuthenticationManagerType authType)
 
AuthenticationManagerType getAuthenticationManagerType ()
 
virtual bool addAdditionalUUIDKey (const char *connectionName, const char *uuid)=0
 
virtual bool isAuthenticated (const char *connectionName, const char *authResponse)=0
 
virtual bool doesPinMatch (const char *pinAttempt)=0
 

Detailed Description

This is the external interface of authentication when using the menu library. It provides the support for checking if a connection is authenticated and also for adding new keys. There are two implementations of it so far, and more may follow so always try and use the interface rather than a given impl.

Member Function Documentation

◆ getAuthenticationManagerType()

AuthenticationManagerType AuthenticationManager::getAuthenticationManagerType ( )
inline

Get the type of this authentication manager, such as EEPROM, FLASH, NONE.

Returns
the type of the manager

◆ addAdditionalUUIDKey()

virtual bool AuthenticationManager::addAdditionalUUIDKey ( const char *  connectionName,
const char *  uuid 
)
pure virtual

Adds an additional name, key mapping to the authentication manager, if there is space left in internal storage. If there is not enough space, it will return false and you need to reset the storage to proceed, as it's probably full.

Parameters
connectionNamethe name of the remote
uuidthe key of the API / UI
Returns
true if successful otherwise false.

Implemented in EepromAuthenticatorManager, ReadOnlyAuthenticationManager, and NoAuthenticationManager.

◆ isAuthenticated()

virtual bool AuthenticationManager::isAuthenticated ( const char *  connectionName,
const char *  authResponse 
)
pure virtual

Checks if a set of connection parameters is allowed to connect.

Parameters
connectionNamethe name of the remote
authResponsethe key from the remote
Returns
true if authenticated otherwise false.

Implemented in ReadOnlyAuthenticationManager, EepromAuthenticatorManager, and NoAuthenticationManager.

◆ doesPinMatch()

virtual bool AuthenticationManager::doesPinMatch ( const char *  pinAttempt)
pure virtual

Checks if the parameter pinAttempt matches with the one stored within this authentication class.

Parameters
pinAttemptthe pin to be checked
Returns
true if there is a match, otherwise false

Implemented in ReadOnlyAuthenticationManager, EepromAuthenticatorManager, and NoAuthenticationManager.


The documentation for this class was generated from the following file: