Examples of UserProvider


Examples of org.efs.openreports.providers.UserProvider

    try
    {
      FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(
          "database/spring/applicationContext.xml");

      UserProvider userProvider = (UserProvider) appContext.getBean("userProvider", UserProvider.class);
      userProvider.insertUser(user);     
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.jivesoftware.openfire.user.UserProvider

            try {
                Log.debug("Automatically creating new user account for " + username);
                // Create user; use a random password for better safety in the future.
                // Note that we have to go to the user provider directly -- because the
                // provider is read-only, UserManager will usually deny access to createUser.
                UserProvider provider = UserManager.getUserProvider();
                if (!(provider instanceof NativeUserProvider)) {
                    Log.error("Error: not using NativeUserProvider so authentication with " +
                            "NativeAuthProvider will likely fail. Using: " +
                            provider.getClass().getName());
                }
                UserManager.getUserProvider().createUser(username, StringUtils.randomString(8),
                        null, null);
            }
            catch (UserAlreadyExistsException uaee) {
View Full Code Here

Examples of org.keycloak.models.UserProvider

    }

    @Test
    public void testCredentialValidation() throws Exception {
        test1CreateRealm();
        UserProvider userProvider = realmManager.getSession().users();
        UserModel user = userProvider.addUser(realmModel, "bburke");
        UserCredentialModel cred = new UserCredentialModel();
        cred.setType(CredentialRepresentation.PASSWORD);
        cred.setValue("geheim");
        user.updateCredential(cred);
        Assert.assertTrue(userProvider.validCredentials(realmModel, user, UserCredentialModel.password("geheim")));
        List<UserCredentialValueModel> creds = user.getCredentialsDirectly();
        Assert.assertEquals(creds.get(0).getHashIterations(), 1);
        realmModel.setPasswordPolicy( new PasswordPolicy("hashIterations(200)"));
        Assert.assertTrue(userProvider.validCredentials(realmModel, user, UserCredentialModel.password("geheim")));
        creds = user.getCredentialsDirectly();
        Assert.assertEquals(creds.get(0).getHashIterations(), 200);
        realmModel.setPasswordPolicy( new PasswordPolicy("hashIterations(1)"));
    }
View Full Code Here

Examples of org.togglz.core.user.UserProvider

    return new InMemoryStateRepository();
  }

  @Override
  public UserProvider getUserProvider() {
    return new UserProvider() {
      @Override
      public FeatureUser getCurrentUser() {
        return new SimpleFeatureUser("admin", 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.