Examples of User


Examples of org.codehaus.plexus.redback.users.User

                }
            }
            List<UserAssignment> userAssignments = rbac.getUserAssignmentsForRoles( roleNames );
            for ( UserAssignment ua : userAssignments )
            {
                User u = getSecuritySystem().getUserManager().findUser( ua.getPrincipal() );
                if ( u != null )
                {
                    users.add( u );
                }
            }
View Full Code Here

Examples of org.codehaus.plexus.security.user.User

        Map authnResultExceptionsMap = new HashMap();
       
        try
        {
            getLogger().debug( "Authenticate: " + source );
            User user = userManager.findUser( source.getPrincipal() );
            username = user.getUsername();
           
            if ( user.isLocked() && !user.isPasswordChangeRequired() )
            {
                throw new AccountLockedException( "Account " + source.getPrincipal() + " is locked.", user );
            }
           
            PasswordEncoder encoder = securityPolicy.getPasswordEncoder();
            getLogger().debug( "PasswordEncoder: " + encoder.getClass().getName() );
           
            boolean isPasswordValid = encoder.isPasswordValid( user.getEncodedPassword(), source.getPassword() );
            if ( isPasswordValid )
            {
                getLogger().debug( "User " + source.getPrincipal() + " provided a valid password" );
               
                try
                {
                    securityPolicy.extensionPasswordExpiration( user );
                }
                catch ( MustChangePasswordException e )
                {
                    user.setPasswordChangeRequired( true );
                }
               
                authenticationSuccess = true;
                user.setCountFailedLoginAttempts( 0 );
                userManager.updateUser( user );
               
                return new AuthenticationResult( true, source.getPrincipal(), null );
            }
            else
View Full Code Here

Examples of org.codehaus.redback.rest.api.model.User

        this.server.start();
        Connector connector = this.server.getConnectors()[0];
        this.port = connector.getLocalPort();
        log.info( "start server on port " + this.port );

        User user = new User();
        user.setEmail( "toto@toto.fr" );
        user.setFullName( "the root user" );
        user.setUsername( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME );
        user.setPassword( FakeCreateAdminService.ADMIN_TEST_PWD );

        getUserService( null ).createAdminUser( user );


    }
View Full Code Here

Examples of org.cognitor.server.platform.user.domain.User

        service.loadUserByUsername("testUser");
    }

    @Test
    public void shouldReturnUserDetailsWhenUserForUsernameGiven() {
        when(userDaoMock.load("testUser")).thenReturn(new User("testUser", "password"));

        UserDetails details = service.loadUserByUsername("testUser");

        assertEquals("testUser", details.getUsername());
        assertEquals("password", details.getPassword());
View Full Code Here

Examples of org.convey.user.registration.model.User

    private EntityManager entityManager;


    public User registerNewUser(User user) {

        User userMerged = entityManager.merge(user);
        entityManager.flush();
        return userMerged;

    }//registerNewUser
View Full Code Here

Examples of org.cspoker.client.User

    final TableId tableId = new TableId(0);

    int smallBet = 1000;
    int delay = 1500;
   
    User u = new User("Human", "test");
    client = new ClientCore(u);
    client.login(server);   
//    User u2 = new User("Human2", "test");
//    client2 = new ClientCore(u2);
//    client2.login(server);

    final LobbyWindow lobby = new LobbyWindow(client);
    lobby.setLobbyContext(client.getCommunication());
    client.getGui().setLobby(lobby);
//    final LobbyWindow lobby2 = new LobbyWindow(client2);
//    lobby2.setLobbyContext(client2.getCommunication());
//    client2.getGui().setLobby(lobby2);

    tConfig = new TableConfiguration(smallBet, delay, false, false, true,0);
    lobby.getContext().createHoldemTable(u.getUserName() + "'s test table", tConfig);
    // Run blocking calls in extra thread
    displayexecutor.execute(new Runnable() {

      public void run() {
        lobby.show();
View Full Code Here

Examples of org.damour.base.client.objects.User

    super();
  }

  protected void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
    Session session = HibernateUtil.getInstance().getSession();
    User owner = baseService.getAuthenticatedUser(session, request, response);
    if (owner == null) {
      response.sendError(HttpServletResponse.SC_FORBIDDEN);
      response.setStatus(HttpServletResponse.SC_FORBIDDEN);
      response.flushBuffer();
      Logger.log("Unauthorized upload requested: " + request.getRemoteAddr());
View Full Code Here

Examples of org.datacontract.schemas._2004._07.LINQ2Entities.User

        // Read properties file.
        Properties propertiesLogin = new Properties();
        propertiesConfig = new Properties();
        try {
            propertiesLogin.load(new FileInputStream("src/simulationEngine/config/webserviceLogin.properties"));
            user = new User();
            user.setUsername(propertiesLogin.getProperty("username"));
            propertiesConfig.load(new FileInputStream("src/simulationEngine/config/SimulationEngineConfig.properties"));
            proxy.setEndpoint(propertiesConfig.getProperty("wsdlurl"));
//            proxy.setEndpoint(propertiesConfig.getProperty("stagingurl"));           
//            proxy.setEndpoint(propertiesConfig.getProperty("devurl"));                       
View Full Code Here

Examples of org.dbwiki.user.User

  protected void getUserListing(Connection connection) throws SQLException {
    _users = new UserListing();
    Statement stmt = connection.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM " + RelationUser);
    while (rs.next()) {
      _users.add(new User(rs.getInt(RelUserColID), rs.getString(RelUserColLogin), rs.getString(RelUserColFullName), rs.getString(RelUserColPassword)));
    }
    rs.close();
    stmt.close();
   
  }
View Full Code Here

Examples of org.dedeler.template.model.User

          RoleService roleService = applicationContext.getBean(RoleService.class);
          UserService userService = applicationContext.getBean(UserService.class);
         
          Role role = new Role("ROLE_USER");

          User user = new User();
          user.setUsername("admin");
          user.setPassword("7lLEodyoRSvB9W6Rhjc+xfabU0ITmcdbjaW4MfARG5TOb/N7TeMxDB85j/HSm8t1h6pTrATIXySR+yQ5jMo39Q==");// admin
          user.setFirstName("Destan");
          user.setAuthorities(Arrays.asList(role));

          roleService.save(role);
          userService.save(user);

          initialized = true;
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.