planetj.dataengine.security.http
Class LocalUsersOnlyOrOperatingSystemProfile

java.lang.Object
  |
  +--planetj.dataengine.security.http.GenericSignOn
        |
        +--planetj.dataengine.security.http.DBCommonConnectionPoolSignOn
              |
              +--planetj.dataengine.security.http.LocalUsersOnlyOrOperatingSystemProfile
All Implemented Interfaces:
ISignOn, Serializable

public class LocalUsersOnlyOrOperatingSystemProfile
extends DBCommonConnectionPoolSignOn

This class checks that the incoming user has a local ip address. If they don't have a local ip address, then they are prompted to enter their user id and password for a given operating system. A local ip address is considered to be any ip starting with: 10. or 127. or 192.

Author:
PlanetJ Corp.
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
LocalUsersOnlyOrOperatingSystemProfile()
           
 
Method Summary
 boolean isUserPromptRequired(ISecured secured, javax.servlet.http.HttpServletRequest request)
          Tests if the user should be prompted for user id, password, etc when this class is used to sign on.
 boolean signOn(String user, String password, ISecured secured, 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.DBCommonConnectionPoolSignOn
isAlreadySignedOn, prepareForSignOn, signOff
 
Methods inherited from class planetj.dataengine.security.http.GenericSignOn
getFailureMessage, getMaximumSignOnFailures, getSignOnURI, isAdditionalSignOnRequired, processSignOnAttemptsExhausted, sessionExpired, updateProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalUsersOnlyOrOperatingSystemProfile

public LocalUsersOnlyOrOperatingSystemProfile()
Method Detail

isUserPromptRequired

public boolean isUserPromptRequired(ISecured secured,
                                    javax.servlet.http.HttpServletRequest request)
                             throws CMException
Tests if the user should be prompted for user id, password, etc when this class is used to sign on.

Specified by:
isUserPromptRequired in interface ISignOn
Overrides:
isUserPromptRequired in class GenericSignOn
Parameters:
secured - The secured object being signed into.
request - The HttpServletRequest from the user.
Returns:
true if user should be prompted for sign on.
CMException

signOn

public boolean signOn(String user,
                      String password,
                      ISecured secured,
                      javax.servlet.http.HttpServletRequest request)
               throws CMException
Check that the incoming user has a local ip address then treat the application as unsecured. If the incoming user isn't local, prompt them for their operating system user id.

Specified by:
signOn in interface ISignOn
Overrides:
signOn in class DBCommonConnectionPoolSignOn
Parameters:
user - user id entered if operating system sign on
password - password user entered if operating system sign on
secured - the secured object to sign into
request - the HttpServletRequest sent from the user
Returns:
true if user signed on successfully; false otherwise.
CMException