Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IsTemporarilyBlocked.cs
1using System;
2using System.Threading.Tasks;
3using System.Xml;
5
7{
12 {
17 : base()
18 {
19 }
20
28 : base(Xml, Parent, Document)
29 {
30 }
31
35 public override string LocalName => nameof(IsTemporarilyBlocked);
36
44 public override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document) => new IsTemporarilyBlocked(Xml, Parent, Document);
45
51 public override async Task<WafResult?> Review(ProcessingState State)
52 {
53 DateTime? TP = await State.Firewall.LoginAuditor.GetEarliestLoginOpportunity(State.Request.RemoteEndPoint, "HTTP");
54
55 if (TP.HasValue && TP.Value != DateTime.MaxValue)
56 return await this.ReviewChildren(State);
57 else
58 return null;
59 }
60 }
61}
Checks if the remote endpoint of the request is temporarily blocked.
IsTemporarilyBlocked()
Checks if the remote endpoint of the request is temporarily blocked.
override async Task< WafResult?> Review(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
override WafAction Create(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Creates a WAF action from its XML definition.
override string LocalName
XML Local Name for the XML element defining the action.
IsTemporarilyBlocked(XmlElement Xml, WafAction Parent, WebApplicationFirewall Document)
Checks if the remote endpoint of the request is temporarily blocked.
Abstract base class for Web Application Firewall comparisons.
Definition: WafComparison.cs:9
Contains the current state of a review process.
WebApplicationFirewall Firewall
Reference to the current Web Application Firewall object.
HttpRequest Request
Current HTTP Request
Abstract base class for Web Application Firewall actions.
Definition: WafAction.cs:17
WebApplicationFirewall Document
Web Application Firewall document.
Definition: WafAction.cs:60
async Task< WafResult?> ReviewChildren(ProcessingState State)
Reviews the processing state, and returns a WAF result, if any.
Definition: WafActions.cs:72
Web Application Firewall for HttpServer.
ILoginAuditor LoginAuditor
Login Auditor used by the Firewall.
Task< DateTime?> GetEarliestLoginOpportunity(string RemoteEndPoint, string Protocol)
Checks when a remote endpoint can login.