Examples of UsernameCredential


Examples of org.exoplatform.services.security.UsernameCredential

         {
            log.error("Error on retrieving username from callback handler! ", e);
         }
      }

      return new UsernameCredential(username);
   }
View Full Code Here

Examples of org.exoplatform.services.security.UsernameCredential

      if (username == null || password == null)
      {
         return null;
      }

      return new Credential[]{new UsernameCredential(username), new PasswordCredential(password, passwordContext)};
   }
View Full Code Here

Examples of org.exoplatform.services.security.UsernameCredential

         {
            log.error("Error on retrieving username from callback handler! ", e);
         }
      }

      return new UsernameCredential(username);
   }
View Full Code Here

Examples of org.exoplatform.services.security.UsernameCredential

      Identity identity = authenticator.createIdentity(username);

      sharedState.put("exo.security.identity", identity);
      sharedState.put("javax.security.auth.login.name", username);
      subject.getPublicCredentials().add(new UsernameCredential(username));

      return true;
    }
    catch (final Throwable e)
    {
View Full Code Here

Examples of org.exoplatform.services.security.UsernameCredential

            //Perform authentication by setting up the proper Application State
            Authenticator authenticator = (Authenticator) getContainer().getComponentInstanceOfType(Authenticator.class);

            Identity identity = authenticator.createIdentity(username);
            sharedState.put("exo.security.identity", identity);
            subject.getPublicCredentials().add(new UsernameCredential(username));

            return true;
         }
         catch (Exception e)
         {
View Full Code Here

Examples of org.exoplatform.services.security.UsernameCredential

            String confirmnewPass = uiForm.getUIStringInput("confirmnewpass").getValue();

            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.UsernameCredential

        Identity identity = authenticator.createIdentity(username);

        sharedState.put("exo.security.identity", identity);
        sharedState.put("javax.security.auth.login.name", username);
        subject.getPublicCredentials().add(new UsernameCredential(username));
    }
View Full Code Here

Examples of org.exoplatform.services.security.UsernameCredential

      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.UsernameCredential

      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.UsernameCredential

     {
        log.debug("Handle SSO callback authentication. Username: "+username);

        Authenticator authenticator = (Authenticator) getContainer().getComponentInstanceOfType(Authenticator.class);
               
        Credential[] credentials = new Credential[] { new UsernameCredential(username),
          new PasswordCredential(password) };               

        try
        {
          authenticator.validateUser(credentials);
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.