Rocking
asked on
how to identify whether to ask for the authentication or not i.e. if the user is accessing the application through internet or intranet?
hi I am creating a website which is to be deployed on intranet as well as on internet.
If the website is accessed through internet then authentication is through Facebook and in the intranet it is without any authentication.
Question is how to identify whether to ask for the authentication or not i.e. if the user is accessing the application through internet or intranet?
If the website is accessed through internet then authentication is through Facebook and in the intranet it is without any authentication.
Question is how to identify whether to ask for the authentication or not i.e. if the user is accessing the application through internet or intranet?
ASKER
What if the url of both are same Or its not possible to that the url can be same?
getRemoteAddr() returns the client IP regardless of what the URL is.
ASKER
getRemoteAddr() returns the client IP regardless of what the URL is.
if it is the case then how can we identify the browser url? i need to identify the url of the browser based on which can differentiate the intranet address or internet address.
if it is the case then how can we identify the browser url? i need to identify the url of the browser based on which can differentiate the intranet address or internet address.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you are using a web app / servlets, you can get the user's IP from the servlet request ServletRequest.getRemoteAd
see http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getRemoteAddr%28%29
And then determine if that IP address is from your intranet or not.