3using System.Threading.Tasks;
27 : base(
"Account/RemoteQuickLogin",
28 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
45 base.GetAuthenticationSchemes(Request);
66 string LegalId = (string)Parameters[
"PLegalId"].AssociatedObjectValue;
67 string Purpose = (string)Parameters[
"PPurpose"].AssociatedObjectValue;
68 string TabID = (string)Parameters[
"PTabId"].AssociatedObjectValue;
70 if (
string.IsNullOrEmpty(Purpose.Trim()))
85 {
"petitionSent",
false }
91 Request.
Session.
Remove(IoTBroker.Legal.MFA.QuickLogin.UserVariableName);
92 Request.
Session.
Remove(IoTGateway.WebResources.Login.UserVariableName);
93 Request.
Session.
Remove(IoTGateway.WebResources.Login.AutoLoginVariableName);
108 throw new InvalidOperationException(
"Domain in latest legal identity of gateway does not match the gateway domain.");
110 string ServiceId = IoTBroker.Legal.MFA.QuickLogin.GetServiceID(
HttpSessionID,
null);
112 await IoTBroker.Legal.MFA.QuickLogin.StartQuickLogin(Request, ServiceId, LegalId,
113 Purpose,
null,
null, TabID);
117 {
"loggedIn",
false },
118 {
"petitionSent",
true }
125 {
"loggedIn",
false },
126 {
"petitionSent",
false }
A Named dictionary is a dictionary, with a local name and a namespace. Use it to return content that ...
Static class managing the runtime environment of the IoT Gateway.
static HttpServer HttpServer
HTTP Server
static bool IsDomain(string DomainOrHost, bool IncludeAlternativeDomains)
If a domain or host name represents the gateway.
Configures legal identity for the gateway.
static bool HasApprovedLegalIdentities
If there are approved legal identities configured.
static LegalIdentity LatestApprovedLegalIdentity
Latest approved Legal Identity.
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repe...
The server understood the request, but is refusing to fulfill it. Authorization will not help and the...
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.
HttpResponse Response
HTTP Response object, if one has been assigned to the request.
static string GetSessionId(HttpRequest Request, HttpResponse Response)
Gets the session ID used for a request.
const string HttpSessionID
The Cookie Key for HTTP Session Identifiers: "HttpSessionID"
Represets a response of an HTTP client request.
Task Return(Exception ex)
Returns an error to the client.
SessionVariables GetSession(string SessionId)
Gets the set of session states corresponing to a given session ID. If no such session is known,...
override bool TryGetVariable(string Name, out Variable Variable)
Tries to get a variable object, given its name.
string Id
ID of the legal identity
Represents a case-insensitive string.
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.
virtual bool Remove(string VariableName)
Removes a varaiable from the collection.
LegalIdentity LegalId
Legal ID used to identify with the system.
Allows the client to login.
Allows the client to quick login based on a login on another federated broker.
override HttpAuthenticationScheme[] GetAuthenticationSchemes(HttpRequest Request)
Any authentication schemes used to authenticate users before access is granted to the corresponding r...
override bool UserSessions
If the resource uses user sessions.
RemoteQuickLogin()
Allows the client to quick login based on a login on another federated broker.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
Abstract base class for agent resources supporting the POST method.
const string AgentNamespace
https://waher.se/Schema/BrokerAgent.xsd
async Task CheckBlocks(HttpRequest Request)
Checks if the client is blocked.