Class Adaptive

    • Constructor Detail

      • Adaptive

        public Adaptive()
    • Method Detail

      • init

        public void init​(Subject subject,
                         Map sharedState,
                         Map options)
        Description copied from class: AMLoginModule
        Initialize this LoginModule.

        This is an abstract method, must be implemented by user's Login Module to initialize this LoginModule with the relevant information. If this LoginModule does not understand any of the data stored in sharedState or options parameters, they can be ignored.

        Specified by:
        init in class AMLoginModule
        Parameters:
        subject - - the Subject to be authenticated.
        sharedState - - state shared with other configured LoginModules.
        options - - options specified in the login Configuration for this particular LoginModule. It contains all the global and organization attribute configuration for this module. The key of the map is the attribute name (e.g. iplanet-am-auth-ldap-server) as String, the value is the value of the corresponding attribute as Set.
      • process

        public int process​(Callback[] callbacks,
                           int state)
                    throws AuthLoginException
        Description copied from class: AMLoginModule
        Abstract method must be implemented by each login module to control the flow of the login process.

        This method takes an array of sbumitted Callback, process them and decide the order of next state to go. Return -1 if the login is successful, return 0 if the LoginModule should be ignored.

        Specified by:
        process in class AMLoginModule
        Parameters:
        callbacks - Callback[] for this Login state
        state - Order of state. State order starts with 1.
        Returns:
        order of next state. return -1 if authentication is successful, return 0 if the LoginModule should be ignored.
        Throws:
        AuthLoginException
      • getPrincipal

        public Principal getPrincipal()
        Description copied from class: AMLoginModule
        Abstract method must be implemeted by each login module to get the user Principal
        Specified by:
        getPrincipal in class AMLoginModule
        Returns:
        Principal
      • checkAuthFailure

        protected int checkAuthFailure()
        Check to see if there have been any auth failures since last successful login. This relies on the Auth Failure framework with Account Lockout enabled. Post_Auth_Class: Should failure count be reset if successful? Returns authFailScore if AuthFailure
        Returns:
        score achieved with this test
      • checkIPRange

        protected int checkIPRange()
        Check to see if the IP address is within the ranges specified Range can be in the form of: x.x.x.x/YY or x.x.x.x-y.y.y.y. or x:x:x:x:x:x:x:x/YY or x:x:x:x:x:x:x:x-y:y:y:y:y:y:y:y There can be multiple ranges passed in
        Returns:
        score achieved with this test
      • checkIPHistory

        protected int checkIPHistory()
        Check to see if the IP address being used is in the clients history IPHistory is stored in a single attribute, separated by "|" If the client IP is new, (Not seen before) then add it to front of list, and drop from end of list. The PostAuthN Method will update the profile if needed.
        Returns:
        score achieved with this test
      • checkGeoLocation

        protected int checkGeoLocation()
      • checkKnownCookie

        protected int checkKnownCookie()
        Check to see if the client has a cookie with optional value
        Returns:
        score achieved with this test
      • checkRequestHeader

        protected int checkRequestHeader()
        Check to see if the client has a cookie with optional value
        Returns:
        score achieved with this test
      • checkRegisteredClient

        protected int checkRegisteredClient()
        Check to see if the client has a cookie with optional value
        Returns:
        score achieved with this test
      • checkTimeDay

        protected int checkTimeDay()
        Check to see if current time is within range
        Returns:
        score achieved with this test
      • checkLastLogin

        protected int checkLastLogin()
        Check to see if the last login is within the allowed range Last login is stored in a cookie in encrypted format
        Returns:
        score achieved with this test
      • checkRiskAttribute

        protected int checkRiskAttribute()
        Check to see if the user profile has a risk attribute with value
        Returns:
        score achieved with this test
      • setPostAuthNParams

        protected void setPostAuthNParams()
        This builds a map, of the data needed by the PostAuth Class, serializes it, and then adds it to the Session
      • getOptionAsBoolean

        protected boolean getOptionAsBoolean​(Map m,
                                             String i)
      • getOptionAsInteger

        protected int getOptionAsInteger​(Map m,
                                         String i)
      • destroyModuleState

        public void destroyModuleState()
        Description copied from class: AMLoginModule
        This method should be overridden by each login module to destroy dispensable state fields.
        Overrides:
        destroyModuleState in class AMLoginModule
      • nullifyUsedVars

        public void nullifyUsedVars()
        Description copied from class: AMLoginModule
        This method should be overridden by each login module to do some garbage collection work after the module process is done. Typically those class wide global variables that will not be used again until a logout call should be nullified.
        Overrides:
        nullifyUsedVars in class AMLoginModule