2using System.Collections.Generic;
3using System.Threading.Tasks;
41 AgentResource.Factory = Factory;
65 List<IAgentResource> Resources =
new List<IAgentResource>();
76 await Resource.
Register(WebServer,
this);
84 this.resources = Resources.ToArray();
101 if (!(this.resources is
null))
124 return this.nonceValues.
AddAsync(Nonce,
true);
Static class managing the application event log. Applications and services log events on this static ...
static void Exception(Exception Exception, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, params KeyValuePair< string, object >[] Tags)
Logs an exception. Event type will be determined by the severity of the exception.
Static class managing the runtime environment of the IoT Gateway.
static HttpServer HttpServer
HTTP Server
static LoginAuditor LoginAuditor
Current Login Auditor. Should be used by modules accepting user logins, to protect the system from un...
Implements an HTTP server.
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static Task< IPersistentDictionary > GetDictionary(string Collection)
Gets a persistent dictionary containing objects in a collection.
This filter selects objects that have a named field equal to a given value.
Static class that dynamically manages types and interfaces available in the runtime environment.
static object Instantiate(Type Type, params object[] Arguments)
Returns an instance of the type Type . If one needs to be created, it is. If the constructor requires...
static Type[] GetTypesImplementingInterface(string InterfaceFullName)
Gets all types implementing a given interface.
A factory that can create and validate JWT tokens.
Class that monitors login events, and help applications determine malicious intent....
Task Start()
Starts the module.
Task Stop()
Stops the module.
LoginAuditor Auditor
Login auditor
async Task< ApiKey > GetAgentApiApiKey()
Gets API Key for the Agent API.
Task< bool > HasNonceBeenUsed(string Nonce)
Checks if a Nonce value has been used.
AgentApi()
Agent API Module.
AgentApi(JwtFactory Factory, LoginAuditor Auditor)
Agent API Module.
async Task< ApiKey > GetApiKey(string ApiKey)
Gets an API Key
Task RegisterNonceValue(string Nonce)
Registers a nonce value.
async Task Start(HttpServer WebServer)
Starts the module using a specific web server.
async Task Stop(HttpServer WebServer)
Stops the module using a specific web server.
Persistent dictionary that can contain more entries than possible in the internal memory.
Task< bool > ContainsKeyAsync(string key)
Determines whether the System.Collections.Generic.IDictionary{string,object} contains an element with...
Task AddAsync(string key, object value)
Adds an element with the provided key and value to the System.Collections.Generic....
Interface for late-bound modules loaded at runtime.
Interface for agent resources.
Task Unregister(HttpServer WebServer)
Unregisters the resource from a web server.
Task Register(HttpServer WebServer, AgentApi AgentApi)
Registers the resource on a web server.