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

Field Summary
 
Fields inherited from interface planetj.dataengine.security.http.ISignOn
GLOBAL_SIGNON_KEY_OPERATION_ID, GLOBAL_SIGNON_KEY_SYSTEM_ALIAS, TIMEOUT_SECONDS
 
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
 
Methods inherited from class planetj.dataengine.security.http.UnsecuredSignOn
isUserPromptRequired, signOnUnsecured
 
Methods inherited from class planetj.dataengine.security.http.GenericSignOn
getFailureMessage, getMaximumSignOnFailures, getSignOnURI, isAdditionalSignOnRequired, isAlreadySignedOn, prepareForSignOn, processSignOnAttemptsExhausted, sessionExpired, signOff, updateProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalUsersOnly

public LocalUsersOnly()
LocalUsersOnly constructor comment.

Method Detail

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 application
pPassword - The password for signing on to the application
request - 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