5using System.Threading.Tasks;
28 params KeyValuePair<Type, Expression>[] PatternMatches)
29 : base(AgentResourceName, PatternMatches)
68 protected static bool IsValidJID(
string JID,
bool AllowDomainJID,
bool AllowBareJID,
bool AllowFullJID)
72 if (JID.EndsWith(
"@"))
76 int i = JID.IndexOf(
"@/");
78 JID = JID.Insert(i + 1,
"example.com");
102 DateTime Now = DateTime.Now;
113 StringBuilder Xml =
new StringBuilder();
116 return Xml.ToString();
119 private static string LegalIDXml(
LegalIdentity ID, StringBuilder Xml)
121 string BareJid =
null;
132 if (
string.IsNullOrEmpty(BareJid))
135 Xml.Append(
"<qlRef xmlns='");
137 Xml.Append(
"' bareJid='");
141 ID.Serialize(Xml,
true,
true,
true,
true,
true,
true,
true,
null,
XmppServerModule.Legal);
143 Xml.Append(
"</qlRef>");
Helps with common XML-related tasks.
static string Encode(string s)
Encodes a string for use in XML.
Static class managing the runtime environment of the IoT Gateway.
static bool HasDomain
If a domain name is configured.
Abstract base class for XMPP client connections
const string QuickLoginNamespace
http://waher.se/Schema/QL.xsd
Manages an XMPP client connection. Implements XMPP, as defined in https://tools.ietf....
static readonly Regex DomainJidRegEx
Regular expression for Domain JIDs
static readonly Regex FullJidRegEx
Regular expression for Full JIDs
static readonly Regex BareJidRegEx
Regular expression for Bare JIDs
static readonly CaseInsensitiveString Empty
Empty case-insensitive string
Static interface for database persistence. In order to work, a database provider has to be assigned t...
This filter selects objects that conform to all child-filters provided.
This filter selects objects that have a named field equal to a given value.
This filter selects objects that have a named field greater or equal to a given value.
This filter selects objects that have a named field lesser or equal to a given value.
Property[] Properties
Properties detailing the legal identity.
CaseInsensitiveString Name
Property name
CaseInsensitiveString Value
Property value
Abstract base class for agent resources supporting the POST method.
Abstract base class for XMPP resources.
static bool IsValidJID(string JID)
Checks if a string is a valid Bare or Full JID.
static bool IsValidFullJID(string JID)
Checks if a string is a valid Full JID.
static bool IsValidBareJID(string JID)
Checks if a string is a valid Bare JID.
static bool IsValidJID(string JID, bool AllowDomainJID, bool AllowBareJID, bool AllowFullJID)
Checks if a string is a valid Bare or Full JID.
static async Task< string > GetApprovedLegalIDXml(string Account)
Gets XML containing the latest approvied Legal ID for an account, for inclusion in requests to peers.
AgentXmppPostResource(string AgentResourceName, params KeyValuePair< Type, Expression >[] PatternMatches)
Abstract base class for XMPP resources.
Service Module hosting the XMPP broker and its components.
IdentityState
Lists recognized legal identity states.