Package org.exoplatform.services.security

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


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

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

         {
            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 identity = authenticator.createIdentity(userId);

         sharedState.put("exo.security.identity", identity);
         sharedState.put("javax.security.auth.login.name", userId);

         subject.getPrivateCredentials().add(password);
         subject.getPublicCredentials().add(new UsernameCredential(username));
         return true;
      }
      catch (final Exception e)
      {
         if (LOG.isDebugEnabled())
View Full Code Here

            {
               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);

            subject.getPrivateCredentials().add(password);
            subject.getPublicCredentials().add(new UsernameCredential(username));
         }
         return true;

      }
      catch (final Exception e)
View Full Code Here

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

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

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

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

            {
               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);

            subject.getPrivateCredentials().add(password);
            subject.getPublicCredentials().add(new UsernameCredential(username));
         }
         return true;

      }
      catch (final Exception e)
View Full Code Here

         {
            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 identity = authenticator.createIdentity(userId);

         sharedState.put("exo.security.identity", identity);
         sharedState.put("javax.security.auth.login.name", userId);

         subject.getPrivateCredentials().add(password);
         subject.getPublicCredentials().add(new UsernameCredential(username));
         return true;
      }
      catch (final Exception e)
      {
         LoginException le = new LoginException(e.getMessage());
View Full Code Here

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

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

         {
            LOG.error("Could not get username.", e);
         }
      }

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

TOP

Related Classes of org.exoplatform.services.security.UsernameCredential

Copyright © 2018 www.massapicom. 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.