MAXREFDES143#: DeepCover Embedded Security in IoT Authenticated Sensing & Notification

Dependencies:   MaximInterface mbed

Embed: (wiki syntax)

« Back to documentation index

WebServerInterface Class Reference

WebServerInterface Class Reference

Network interface to the web server supporting authenticated posting of event through an HTTP challenge-respones scheme with SHA-256 data signing. More...

#include <WebServerInterface.hpp>

Public Member Functions

 WebServerInterface (ESP8266 &esp8266)
bool initialize ()
 Initialize network interface and connect to access point.
bool authPostHttpEvent (MaximInterface::DS2465 &macCoproc, PostEvent event, const std::string &postData, bool setSecret)
 Send an authenticated event message to the web server.
const MaximInterface::RomId & sessionId () const

Static Public Member Functions

static std::string formatSensorDataPostBody (const SensorData &sensorData)
 Format sensor data as text suitable for use in a POST body.

Detailed Description

Network interface to the web server supporting authenticated posting of event through an HTTP challenge-respones scheme with SHA-256 data signing.

Definition at line 52 of file WebServerInterface.hpp.


Constructor & Destructor Documentation

WebServerInterface ( ESP8266 esp8266 )
Parameters:
esp8266Interface to ESP8266 for Wi-Fi access.
pcOptional serial interface for received web traffic.

Definition at line 56 of file WebServerInterface.hpp.


Member Function Documentation

bool authPostHttpEvent ( MaximInterface::DS2465 &  macCoproc,
PostEvent  event,
const std::string &  postData,
bool  setSecret 
)

Send an authenticated event message to the web server.

Parameters:
macCoProcCoprocessor such as the DS2465 used to calculate the authentication MAC.
eventEvent message type. Message body as determined by the event message type. True if the Transport Secret needs to be selected in the coprocessor.
Returns:
True on success.
std::string formatSensorDataPostBody ( const SensorData sensorData ) [static]

Format sensor data as text suitable for use in a POST body.

Parameters:
sensorDataSensor data to format.
Returns:
Data formatted for web server.

Definition at line 317 of file WebServerInterface.cpp.

bool initialize (  )

Initialize network interface and connect to access point.

Returns:
True on success.

Definition at line 71 of file WebServerInterface.cpp.

const MaximInterface::RomId& sessionId (  ) const

Session ID used by the web server to distinguish between multiple Controllers.

Definition at line 79 of file WebServerInterface.hpp.