1using System.Collections.Generic;
2using System.Threading.Tasks;
14 : base(
"/UpdateApiKey")
18 public override bool HandlesSubPaths =>
false;
19 public override bool UserSessions =>
true;
30 if (!(Obj is Dictionary<string, string> Form))
37 if (!Form.ContainsKey(
"Key") ||
string.IsNullOrEmpty(Key = Form[
"Key"]))
40 if (!Form.ContainsKey(
"Owner") ||
string.IsNullOrEmpty(Owner = Form[
"Owner"]))
46 if (!Form.ContainsKey(
"MaxAccounts") || !
long.TryParse(Form[
"MaxAccounts"], out
long MaxAccounts) || MaxAccounts < 1)
55 ApiKey.MaxAccounts = MaxAccounts;
Static class managing the runtime environment of the IoT Gateway.
static IUser AssertUserAuthenticated(HttpRequest Request, string Privilege)
Makes sure a request is being made from a session with a successful user login.
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repe...
Represents an HTTP request.
HttpRequestHeader Header
Request header.
bool HasData
If the request has data.
async Task< object > DecodeDataAsync()
Decodes data sent in request.
Represets a response of an HTTP client request.
Base class for all synchronous HTTP resources. A synchronous resource responds within the method hand...
The server has not found anything matching the Request-URI. No indication is given of whether the con...
The response to the request can be found under a different URI and SHOULD be retrieved using a GET me...
Represents a case-insensitive string.
static bool IsNullOrEmpty(CaseInsensitiveString value)
Indicates whether the specified string is null or an CaseInsensitiveString.Empty string.
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static async Task Update(object Object)
Updates an object in the database.
This filter selects objects that have a named field equal to a given value.
async Task POST(HttpRequest Request, HttpResponse Response)
Executes the POST method on the resource.
bool AllowsPOST
If the POST method is allowed.
POST Interface for HTTP resources.