Interface AuthenticationListener


  • public interface AuthenticationListener
    An AuthenticationListener listens for notifications while Subjects authenticate with the system.
    Since:
    0.9
    • Method Detail

      • onSuccess

        void onSuccess(AuthenticationToken token,
                       AuthenticationInfo info)
        Callback triggered when an authentication attempt for a Subject has succeeded.
        Parameters:
        token - the authentication token submitted during the Subject (user)'s authentication attempt.
        info - the authentication-related account data acquired after authentication for the corresponding Subject.
      • onFailure

        void onFailure(AuthenticationToken token,
                       AuthenticationException ae)
        Callback triggered when an authentication attempt for a Subject has failed.
        Parameters:
        token - the authentication token submitted during the Subject (user)'s authentication attempt.
        ae - the AuthenticationException that occurred as a result of the attempt.
      • onLogout

        void onLogout(PrincipalCollection principals)
        Callback triggered when a Subject logs-out of the system.

        This method will only be triggered when a Subject explicitly logs-out of the session. It will not be triggered if their Session times out.
        Parameters:
        principals - the identifying principals of the Subject logging out.