2using System.Collections.Generic;
4using System.Threading.Tasks;
53 Dictionary<string, string> AttachmentUrls =
new Dictionary<string, string>();
54 StringBuilder sb =
new StringBuilder();
56 XmlDocument Doc =
new XmlDocument()
58 PreserveWhitespace =
true
61 Doc.LoadXml(Xml = sb.ToString());
65 LegalIdentityInfo IdentityInfo = await
QuickLogin.PrepareQuickLoginIdentity(Identity2,
"Session",
true,
null);
70 catch (XmlException ex)
120 if (Privilege.StartsWith(
"iotid:"))
121 return this.legalComponent.IsAccessToIdentityAuthorized(this.from.BareJid, Privilege.Substring(6));
122 else if (Privilege.StartsWith(
"iotsc:"))
123 return this.legalComponent.IsAccessToContractAuthorized(this.from.BareJid, Privilege.Substring(6));
134 return Task.FromResult(
new RequestOrigin(this.from.BareJid,
null,
null,
null));
142 public Task<IEnumerable<KeyValuePair<string, object>>>
CreateClaims(
bool Encrypted)
144 if (this.user is
null)
145 return Task.FromResult<IEnumerable<KeyValuePair<string, object>>>(
null);
147 return this.user.CreateClaims(Encrypted);
158 if (this.user is
null)
159 return Task.FromResult<
string>(
null);
161 return this.user.CreateToken(Factory, Encrypted);
Helps with common XML-related tasks.
static XmlException AnnotateException(XmlException ex)
Creates a new XML Exception object, with reference to the source XML file, for information.
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.
LegalIdentity()
Legal identity
Property[] Properties
Properties detailing the legal identity.
Contains information about one XMPP address.
A factory that can create and validate JWT tokens.
User object representing a legal identity.
LegalIdentity Identity
Legal Identity object
string PasswordHash
Password hash
bool HasPrivilege(string Privilege)
If user has a given privilege.
QuickLoginUser User
Underlying Quick-Login user object.
Task< string > CreateToken(JwtFactory Factory, bool Encrypted)
Creates a JWT Token referencing the user object.
Task< IEnumerable< KeyValuePair< string, object > > > CreateClaims(bool Encrypted)
Creates a set of claims identifying the user.
Task< RequestOrigin > GetOrigin()
Origin of request.
static async Task< LegalIdentityUser > Create(LegalIdentity Identity, XmppAddress From, LegalComponent LegalComponent)
Creates a user object representing a legal identity.
XmppAddress From
Source of request.
string UserName
User name.
string PasswordHashType
Type of password hash
Provisioning and registry service component.
Web resource that allows calling applications to enable Quick-Login using legal identities.
Tokens available in request.
A User that can participate in distributed operations, where the user is identified using a JWT token...
Interface for requestors that can act as an origin for distributed requests.