I have enriched the dynamicweb user with a field for an IP address.
Preferably I would like to hook in before the user gets logged in and return a custom error message, but I don't see how.
Now I've added an OnExtranetLoginObserver in which I retrieve the IP address value of the user logging in and compare it to its current IP.
If they do not match I would like to log-off and redirect to a login page with a parameter so I can show an error message.
I used to use this, but this is no longer available:
var sec = new Dynamicweb.Security();
sec.ExtranetLogoff(false);
I've now tried this, but this crashes:
var loginHandler = new Dynamicweb.Frontend.LoginHandler();
loginHandler.ExtranetLogoff(false);
Can anyone tell me how to best achieve my goal?