Class LoginContextDriver


  • public class LoginContextDriver
    extends Object
    This class is invoked implicitly by the server to log in the user information that was sent on the wire by the client. Clients will use the doClientLogin method to simulate authentication to the server.
    Author:
    Harpreet Singh ([email protected]), Jyri Virkki
    • Method Detail

      • doClientLogin

        public static Subject doClientLogin​(int type,
                                            CallbackHandler handler)
                                     throws LoginException
        Perform "login" on the client side. The login consists of putting the credentials in a place where the IIOP/Remote EJB code can find it, and sent it over to the remote server where the actual authentication takes place.
        Parameters:
        int - type whether it is username_password or certificate based login.
        CallbackHandler - the callback handler to gather user information.
        Throws:
        LoginException - the exception thrown by the callback handler.
      • validateJaasLogin

        public static void validateJaasLogin​(String username,
                                             String jaasCtx,
                                             String realm,
                                             Subject subject)
      • getValidSubject

        public static Subject getValidSubject​(Subject subject)
      • getValidRealm

        public static String getValidRealm​(String realm)
      • getJaasContext

        public static String getJaasContext​(String realm)
      • throwLoginException

        public static void throwLoginException​(Exception exception)
      • auditAuthenticate

        public static void auditAuthenticate​(String username,
                                             String realm,
                                             boolean success)