2using System.Collections.Generic;
3using System.Threading.Tasks;
21 : base(
"Account/GetSessionToken",
22 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
36 base.GetAuthenticationSchemes(Request);
56 !(v.ValueElement.AssociatedObjectValue is SessionTokenInfo
Info))
66 {
"AccountCreated",
new Dictionary<string,object>()
68 {
"created", Info.Account.Created },
69 {
"enabled", Info.Account.Enabled },
70 {
"canRelay", Info.Account.CanRelayMessages },
71 {
"jwt", Info.Token },
72 {
"expires", Info.Expires },
75 {
"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 ...
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.
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.
Variables Session
Contains session states, if the resource requires sessions, or null otherwise.
Represets a response of an HTTP client request.
async Task Return(object Object)
Returns an object to the client. This method can only be called once per response,...
The server has not found anything matching the Request-URI. No indication is given of whether the con...
Class managing a script expression.
Contains information about a variable.
virtual bool TryGetVariable(string Name, out Variable Variable)
Tries to get a variable object, given its name.
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