planetj.dataengine.security.http
Class LocalUsersOnly
java.lang.Object
|
+--planetj.dataengine.security.http.GenericSignOn
|
+--planetj.dataengine.security.http.UnsecuredSignOn
|
+--planetj.dataengine.security.http.LocalUsersOnly
- All Implemented Interfaces:
- ISignOn, Serializable
- public class LocalUsersOnly
- extends UnsecuredSignOn
This class check that the incoming user has a local ip address.
A local ip address is considered to be any ip starting with:
10. or 127. or 192.
- See Also:
- Serialized Form
Constructor Summary |
LocalUsersOnly()
LocalUsersOnly constructor comment. |
Method Summary |
static boolean |
isLocal(javax.servlet.http.HttpServletRequest request)
Checks the given request to see if the remote host is a local ip address. |
boolean |
signOn(String pUserId,
String pPassword,
ISecured pSecuredApplication,
javax.servlet.http.HttpServletRequest request)
Check that the incoming user has a local ip address then treat the application as unsecured |
LocalUsersOnly
public LocalUsersOnly()
- LocalUsersOnly constructor comment.
isLocal
public static boolean isLocal(javax.servlet.http.HttpServletRequest request)
- Checks the given request to see if the remote host is a local ip address.
- Returns:
- true if ip address starts with 10. 127. or 192.
signOn
public boolean signOn(String pUserId,
String pPassword,
ISecured pSecuredApplication,
javax.servlet.http.HttpServletRequest request)
throws CMException
- Check that the incoming user has a local ip address then treat the application as unsecured
- Specified by:
signOn
in interface ISignOn
- Overrides:
signOn
in class UnsecuredSignOn
- Parameters:
pUserId
- The user id identifying the user signing on to the applicationpPassword
- The password for signing on to the applicationrequest
- The HttpServletRequest representing the http request of the user. Additional sign on
information can be stored as attributes in the request
- Returns:
- If the sign on was successful true should be returned. A return value of false or a thrown
CMException indicates that the sign on failed.
CMException