3using System.Threading.Tasks;
22 : base(
"Account/GetSessionToken",
23 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
40 base.GetAuthenticationSchemes(Request);
60 !(v.ValueElement.AssociatedObjectValue is SessionTokenInfo
Info))
70 {
"AccountCreated",
new Dictionary<string,object>()
72 {
"created", Info.Account.Created },
73 {
"updated", Info.Account.Updated },
74 {
"enabled", Info.Account.Enabled },
75 {
"canRelay", Info.Account.CanRelayMessages },
76 {
"jwt", Info.Token },
77 {
"expires", Info.Expires },
80 {
"seconds", Info.Seconds }
Helps with common JSON-related tasks.
static readonly DateTime UnixEpoch
Unix Date and Time epoch, starting at 1970-01-01T00:00:00Z
A Named dictionary is a dictionary, with a local name and a namespace. Use it to return content that ...
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repe...
Base class for all HTTP authentication schemes, as defined in RFC-7235: https://datatracker....
Represents an HTTP request.
SessionVariables Session
Contains session states, if the resource requires sessions, or null otherwise.
Represets a response of an HTTP client request.
Task Return(Exception ex)
Returns an error to the client.
The server has not found anything matching the Request-URI. No indication is given of whether the con...
override bool TryGetVariable(string Name, out Variable Variable)
Tries to get a variable object, given its name.
Static class managing loading of resources stored as embedded resources or in content files.
static string LoadResourceAsText(string ResourceName)
Loads a text resource from an embedded resource.
Class managing a script expression.
Contains information about a variable.
Gets information about a newly created token stored in a session variable.
GetSessionToken()
Gets information about a newly created token stored in a session variable.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
override bool UserSessions
If the resource uses user sessions.
override HttpAuthenticationScheme[] GetAuthenticationSchemes(HttpRequest Request)
Any authentication schemes used to authenticate users before access is granted to the corresponding r...
Gets information about the currently logged in account.
Abstract base class for agent resources supporting the POST method.
const string AgentNamespace
https://waher.se/Schema/BrokerAgent.xsd