Examples of loadUserByUsername()


Examples of com.tll.service.entity.user.IUserService.loadUserByUsername()

        final PersistContext pc = (PersistContext) sc.getAttribute(PersistContext.KEY);
        if(pc == null) {
          throw new ServletException("Unable to obtain the persist context");
        }
        final IUserService userService = pc.getEntityServiceFactory().instance(IUserService.class);
        final User user = (User) userService.loadUserByUsername(appContext.getDfltUserEmail());
        log.debug("Creating mock admin context from default user email specified in config..");
        final AdminContext ac = new AdminContext();
        ac.setUser(user);
        session.setAttribute(AdminContext.KEY, ac);
        log.info("Server-side admin context created and stored in the servlet context");
View Full Code Here

Examples of com.tll.service.entity.user.IUserService.loadUserByUsername()

        final PersistContext pc = (PersistContext) sc.getAttribute(PersistContext.KEY);
        if(pc == null) {
          throw new ServletException("Unable to obtain the persist context");
        }
        final IUserService userService = pc.getEntityServiceFactory().instance(IUserService.class);
        final User user = (User) userService.loadUserByUsername(appContext.getDfltUserEmail());
        log.debug("Creating mock admin context from default user email specified in config..");
        final AdminContext ac = new AdminContext();
        ac.setUser(user);
        session.setAttribute(AdminContext.KEY, ac);
        log.info("Server-side admin context created and stored in the servlet context");
View Full Code Here

Examples of com.vmware.bdd.security.service.impl.UserService.loadUserByUsername()

      String userXmlPath = confPath + File.separator + UsersFile;
      File usrXmlFile = new File(userXmlPath);

      TestFileUtils.createXMLFile(users1, usrXmlFile);
      try {
         userDetails1 = accountService.loadUserByUsername("root");
      } catch (UsernameNotFoundException e) {
      }
      Assert.assertNull(userDetails1);
      UserDetails userDetails2 = accountService.loadUserByUsername("serengeti");
      assertNotNull(userDetails2);
View Full Code Here

Examples of com.vmware.bdd.security.service.impl.UserService.loadUserByUsername()

      try {
         userDetails1 = accountService.loadUserByUsername("root");
      } catch (UsernameNotFoundException e) {
      }
      Assert.assertNull(userDetails1);
      UserDetails userDetails2 = accountService.loadUserByUsername("serengeti");
      assertNotNull(userDetails2);
      TestFileUtils.deleteXMLFile(usrXmlFile);
      Users users2 = new Users();
      User user2 = new User();
      user2.setName("*");
 
View Full Code Here

Examples of com.vmware.bdd.security.service.impl.UserService.loadUserByUsername()

      Users users2 = new Users();
      User user2 = new User();
      user2.setName("*");
      users2.setUsers(Arrays.asList(user2));
      TestFileUtils.createXMLFile(users2, usrXmlFile);
      userDetails1 = accountService.loadUserByUsername("root");
      assertNotNull(userDetails1);
      assertEquals(userDetails1.getUsername(), "Guest");
      TestFileUtils.deleteXMLFile(usrXmlFile);
      Users users3 = new Users();
      users3.setUsers(Arrays.asList(user2, user1));
View Full Code Here

Examples of com.vmware.bdd.security.service.impl.UserService.loadUserByUsername()

      assertEquals(userDetails1.getUsername(), "Guest");
      TestFileUtils.deleteXMLFile(usrXmlFile);
      Users users3 = new Users();
      users3.setUsers(Arrays.asList(user2, user1));
      TestFileUtils.createXMLFile(users3, usrXmlFile);
      userDetails1 = accountService.loadUserByUsername("serengeti");
      assertNotNull(userDetails1);
      assertEquals(userDetails1.getUsername(), "serengeti");
      TestFileUtils.deleteXMLFile(usrXmlFile);
   }
}
View Full Code Here

Examples of org.acegisecurity.userdetails.UserDetailsService.loadUserByUsername()

    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
        UserDetailsService uds = delegate;  // fix the reference for concurrency support

        if(uds ==null)
            throw new UserMayOrMayNotExistException(Messages.UserDetailsServiceProxy_UnableToQuery(username));
        return uds.loadUserByUsername(username);
    }

    public void setDelegate(UserDetailsService core) {
        this.delegate = core;
    }
View Full Code Here

Examples of org.geoserver.security.GeoServerUserGroupService.loadUserByUsername()

        Collection<GeoServerRole> roles = new ArrayList<GeoServerRole>();
       
        GeoServerUserGroupService service = getSecurityManager().loadUserGroupService(getUserGroupServiceName());
        UserDetails details=null;
        try {
             details = service.loadUserByUsername(principal);
        } catch (UsernameNotFoundException ex) {
            LOGGER.log(Level.WARNING,"User "+ principal + " not found in " + getUserGroupServiceName());
        }
       
        if (details!=null) {
View Full Code Here

Examples of org.geoserver.security.password.DecodingUserDetailsService.loadUserByUsername()

        store.store();
       
        String plainpassword = "geoserver";
        UserDetails admin =  service.loadUserByUsername(GeoServerUser.ADMIN_USERNAME);       
        assertFalse(plainpassword.equals(admin.getPassword()));
        UserDetails admin2 =  decService.loadUserByUsername(GeoServerUser.ADMIN_USERNAME);
        assertTrue(plainpassword.equals(admin2.getPassword()));
    }

    @Test
    public void testCopyFrom() {
View Full Code Here

Examples of org.pentaho.platform.security.userroledao.service.UserRoleDaoUserDetailsService.loadUserByUsername()

  @Test( expected = UsernameNotFoundException.class )
  public void testLoadUserByUsernameUsernameNotFound() {
    UserRoleDaoUserDetailsService userDetailsService = new UserRoleDaoUserDetailsService();
    userDetailsService.setUserRoleDao( userRoleDao );
    userDetailsService.loadUserByUsername( USERNAME );
  }

  @Test
  public void testLoadUserByUsername() {
    loginAsSysTenantAdmin();
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.