Examples of LoginDto


Examples of com.bolbachchan.blog.dto.LoginDTO

  /**
   * @return the loginDTO
   */
  public LoginDTO getLoginDTO() {
    if (loginDTO == null) {
      loginDTO = new LoginDTO();
    }
    return loginDTO;
  }
View Full Code Here

Examples of com.dream.dto.user.login.LoginDTO

        return model;
    }

    @Override
    protected Object formBackingObject(HttpServletRequest request) throws Exception {
        return new LoginDTO();
    }
View Full Code Here

Examples of com.dream.dto.user.login.LoginDTO

        return LoginDTO.class.equals(clazz);
    }

    @Override
    public void validate(Object target, Errors errors) {
        LoginDTO loginDTO = (LoginDTO) target;

        String username = loginDTO.getUsername();
        if (ValidateUtil.isEmptyText(username)) {
            errors.rejectValue("username", null, "Username must not be empty!");
        }

        String password = loginDTO.getPassword();
        if (ValidateUtil.isEmptyText(password)) {
            errors.rejectValue("password", null, "Password must not be empty!");
        }
    }
View Full Code Here

Examples of it.unipd.netmus.shared.LoginDTO

     */
    @Override
    public void sendLogin(String user, String password) throws LoginException {
        final String username = user;
        final String pass = password;
        LoginDTO login = new LoginDTO(user, password);

        // Make the call to send login info.
        login_service_svc.startLogin(login, new AsyncCallback<String>() {

            @Override
View Full Code Here

Examples of it.unipd.netmus.shared.LoginDTO

    @Override
    public void sendRegistration(String user, String password,
            String confirmPassword) throws RegistrationException {
        final String username = user;
        final String pass = password;
        LoginDTO login = new LoginDTO(user, password);

        if (!FieldVerifier.isValidPassword(password))
            goTo(new LoginPlace(username, pass, my_constants.errorPassword(),
                    LoginType.NETMUSREGISTRATION));
        else if (!FieldVerifier.isValidEmail(username))
View Full Code Here

Examples of it.unipd.netmus.shared.LoginDTO

        ODF.get().store().instance(this).ensureUniqueKey().now();
        this.addToCache();
    }

    public LoginDTO toLoginDTO() {
        LoginDTO tmp = new LoginDTO(this.user, this.password_hash);
        tmp.setLastSessionId(this.last_session_id);
        return tmp;
    }
View Full Code Here

Examples of lv.odylab.evemanage.client.rpc.dto.user.LoginDto

    @Test
    public void testLogin_NoUser() {
        when(userService.getCurrentUser()).thenReturn(null);
        when(userService.createLoginURL("requestUri")).thenReturn("loginURL");

        LoginDto loginDto = userManagementService.login("requestUri", "en");
        assertFalse(loginDto.isLoggedIn());
        assertEquals("loginURL", loginDto.getLoginUrl());
    }
View Full Code Here

Examples of lv.odylab.evemanage.client.rpc.dto.user.LoginDto

    @Test
    public void testLogin_NoUser_GwtDevelopment() {
        when(userService.getCurrentUser()).thenReturn(null);
        when(userService.createLoginURL("http://127.0.0.1:8888/")).thenReturn("loginURL");
        LoginDto loginDto = userManagementService.login("http://127.0.0.1:8888/", "en");
        assertFalse(loginDto.isLoggedIn());
        assertEquals("loginURL?gwt.codesvr=127.0.0.1:9997", loginDto.getLoginUrl());
    }
View Full Code Here

Examples of lv.odylab.evemanage.client.rpc.dto.user.LoginDto

        User googleUser = new User("vleushin@gmail.com", "gmail.com", "1234567890");
        when(userService.getCurrentUser()).thenReturn(googleUser);
        when(userDao.getByUserAuthID("1234567890")).thenReturn(null);
        when(userService.createLogoutURL("requestUri")).thenReturn("logoutURL");
        when(userService.isUserAdmin()).thenReturn(false);
        LoginDto loginDto = userManagementService.login("requestUri", "en");

        verify(userDao, times(1)).put(userCaptor.capture());
        assertTrue(loginDto.isLoggedIn());
        assertEquals("vleushin@gmail.com", loginDto.getEmailAddress());
        assertEquals("vleushin", loginDto.getNickname());
        assertEquals("logoutURL", loginDto.getLogoutUrl());
        assertFalse(loginDto.isAdmin());
        assertEquals(0, loginDto.getRoles().size());
    }
View Full Code Here

Examples of lv.odylab.evemanage.client.rpc.dto.user.LoginDto

        user.setNickname("nickname");

        when(userDao.getByUserAuthID("1234567890")).thenReturn(user);
        when(userService.createLogoutURL("requestUri")).thenReturn("logoutURL");
        when(userService.isUserAdmin()).thenReturn(true);
        LoginDto loginDto = userManagementService.login("requestUri", "en");

        verify(userDao, times(1)).put(user);
        assertTrue(loginDto.isLoggedIn());
        assertEquals(Long.valueOf(1), loginDto.getUserID());
        assertEquals("vleushin@gmail.com", loginDto.getEmailAddress());
        assertEquals("vleushin", loginDto.getNickname());
        assertEquals("logoutURL", loginDto.getLogoutUrl());
        assertTrue(loginDto.isAdmin());
        assertEquals(0, loginDto.getRoles().size());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.