Package org.jmanage.core.services

Examples of org.jmanage.core.services.AuthService


        /* User must have username and password specified */
        assert user.getUsername() != null;
        assert user.getPassword() != null;

        /* authenticate with the server */
        AuthService authService = ServiceFactory.getAuthService();
        try {
            authService.login(context, user.getUsername(), user._getPlaintextPassword());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here


        return null;
    }

    // logs-in the user if the username and password are valid
    private boolean login(WebContext context, String username, String password){
        AuthService authService = ServiceFactory.getAuthService();
        try {
            authService.login(context.getServiceContext(),
                    username,
                    password);
            return true;
        } catch (ServiceException e) {
            return false;
View Full Code Here

                /* get the password */
                password = new String(PasswordField.getPassword("Password:"));
            }

            /* authenticate with the server */
            AuthService authService = ServiceFactory.getAuthService();
            try {
                authService.login(new ServiceContextImpl(), username, password);
                break;
            } catch (ServiceException e){
                Out.println(e.getMessage());
                username = null;
                password = null;
View Full Code Here

                                 ActionForm actionForm,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
            throws Exception {
        LoginForm loginForm = (LoginForm) actionForm;
        AuthService authService = ServiceFactory.getAuthService();
        authService.login(Utils.getServiceContext(context),
                loginForm.getUsername(),
                loginForm.getPassword());
        return mapping.findForward(Forwards.SUCCESS);
    }
View Full Code Here

                                 ActionMapping mapping,
                                 ActionForm actionForm,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
            throws Exception {
        AuthService authService = ServiceFactory.getAuthService();
        authService.logout(Utils.getServiceContext(context), context.getUser());
        context.removeUser();
        return mapping.findForward(Forwards.SUCCESS);
    }
View Full Code Here

TOP

Related Classes of org.jmanage.core.services.AuthService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.