help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

IP-Address Based Live Authentication offers an opportunity to bind live system's user with some IP-Address. That offers possibility to authenticate user based on a host or IP network address.

IP-address based authentication is implemented by live system's login page. That means it is not related directly to the authentication module.

IP-Authentication works this way:

* a user wants to access a page at live system;
* the authentication module detects user is not authenticated;
* the authentication module redirects user automatically to login-page;
* login page detects that user is redirected and tries to find some matching IP-Rule for the request's IP-address;
* if the rule is found, the mapped user account for that rule is requested and user is automatically logged in by using the requested user account; all the rights and roles the user account has are automatically used by the session;
* however, if the matching rule is not found, the login-panel is displayed and user must log in manually in order to access the restricted page.


What Is IP-rule?

IP-rule is an object which binds a live system's user with some IP-address by enabling automatic log-in functionailty.
IP-rules are only live system's objects - that means they are placed in live system's database.
There is a GUI for editing IP-rules at the management system: from TopMenu, go Admin->IP-Authentication rules.
One should have basic knowledge of IP-addresses, subnets and subnet masks in order to create IP-rules properly.

The Following Information is needed for IP-rule:

* Name - a human readable name of the rule;
* IP-Address - a host or network address to map with a live system's user account;
* Netmask - subnetmask for describing the IP network address (use here if you want to map the IP-address of a specific host);
* Mapped Member - live system's user to map;

How to program live system's login page to understand the IP-address Based authentication?

Please add the following code into the login page's Page_Load() method:

       if(HttpContext.Current.Request.Params["ReturnUrl"] != null) 
         // A user may want to log in manually.
         string username = (new AxIpRuleAdapter()).

            if(username != null)
               FormsAuthentication.RedirectFromLoginPage(username, false);


How to configure management system for enabling IP-rule administration?

Please see the following link for instructions.