Examples of validateUser()


Examples of org.exoplatform.services.security.Authenticator.validateUser()

            Authenticator authenticator = uiForm.getApplicationComponent(Authenticator.class);
            boolean authenticated;
            try {
                UsernameCredential usernameCred = new UsernameCredential(username);
                PasswordCredential passwordCred = new PasswordCredential(currentPass);
                authenticator.validateUser(new Credential[] { usernameCred, passwordCred });
                authenticated = true;
            } catch (Exception ex) {
                authenticated = false;
            }
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

      cservice = (CommandService)container.getComponentInstanceOfType(CommandService.class);

      // login via Authenticator
      Authenticator authr = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
      String validUser =
         authr.validateUser(new Credential[]{new UsernameCredential("root"), new PasswordCredential("exo")});
      Identity id = authr.createIdentity(validUser);
      ConversationState s = new ConversationState(id);
      ConversationState.setCurrent(s);

      ctx = new BasicAppContext(repService.getDefaultRepository());
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

      if (ctx == null)
      {
         // login via Authenticator
         Authenticator authr = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
         String validUser =
            authr.validateUser(new Credential[]{new UsernameCredential("root"), new PasswordCredential("exo")});
         Identity id = authr.createIdentity(validUser);
         ConversationState s = new ConversationState(id);
         ConversationState.setCurrent(s);

         ctx = new CliAppContext(repService.getDefaultRepository(), PARAMETERS_KEY);
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

        Credential[] credentials = new Credential[] { new UsernameCredential(username),
          new PasswordCredential(password) };               

        try
        {
          authenticator.validateUser(credentials);
            if (log.isTraceEnabled())
            {
               log.trace("Login successful for user " + username);
            }
          return ""+Boolean.TRUE;
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

               throw new LoginException("No Authenticator component found, check your configuration");

            Credential[] credentials =
               new Credential[]{new UsernameCredential(username), new PasswordCredential(password)};

            String userId = authenticator.validateUser(credentials);
            identity = authenticator.createIdentity(userId);
            sharedState.put("javax.security.auth.login.name", userId);
            // TODO use PasswordCredential wrapper
            subject.getPrivateCredentials().add(password);
            subject.getPublicCredentials().add(new UsernameCredential(username));
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

            Authenticator authenticator = uiForm.getApplicationComponent(Authenticator.class);
            boolean authenticated;
            try {
                UsernameCredential usernameCred = new UsernameCredential(username);
                PasswordCredential passwordCred = new PasswordCredential(currentPass);
                authenticator.validateUser(new Credential[] { usernameCred, passwordCred });
                authenticated = true;
            } catch (Exception ex) {
                authenticated = false;
            }
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

        Credential[] credentials = new Credential[] { new UsernameCredential(username),
          new PasswordCredential(password) };               

        try
        {
          authenticator.validateUser(credentials);
          return ""+Boolean.TRUE;
        }
        catch(LoginException le)
        {
          return ""+Boolean.FALSE;
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

      cservice = (CommandService)container.getComponentInstanceOfType(CommandService.class);

      // login via Authenticator
      Authenticator authr = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
      String validUser =
         authr.validateUser(new Credential[]{new UsernameCredential("root"), new PasswordCredential("exo")});
      Identity id = authr.createIdentity(validUser);
      ConversationState s = new ConversationState(id);
      ConversationState.setCurrent(s);

      ctx = new BasicAppContext(repService.getDefaultRepository());
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

      if (ctx == null)
      {
         // login via Authenticator
         Authenticator authr = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
         String validUser =
            authr.validateUser(new Credential[]{new UsernameCredential("root"), new PasswordCredential("exo")});
         Identity id = authr.createIdentity(validUser);
         ConversationState s = new ConversationState(id);
         ConversationState.setCurrent(s);

         ctx = new CliAppContext(repService.getDefaultRepository(), PARAMETERS_KEY);
View Full Code Here

Examples of org.exoplatform.services.security.Authenticator.validateUser()

        Credential[] credentials = new Credential[] { new UsernameCredential(username),
          new PasswordCredential(password) };               

        try
        {
          authenticator.validateUser(credentials);
          return ""+Boolean.TRUE;
        }
        catch(LoginException le)
        {
          return ""+Boolean.FALSE;
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.