Package org.picketlink.idm.api

Examples of org.picketlink.idm.api.IdentitySession


      }
   }

   public User removeUser(String userName, boolean broadcast) throws Exception
   {
      IdentitySession session = service_.getIdentitySession();

      org.picketlink.idm.api.User foundUser = null;

      try
      {
         foundUser = session.getPersistenceManager().findUser(userName);
      }
      catch (IdentityException e)
      {
         log.info("Cannot obtain user: " + userName + "; ", e);

      }

      if (foundUser == null)
      {
         return null;
      }

      try
      {
         // Remove all memberships and profile first
         orgService.getMembershipHandler().removeMembershipByUser(userName, false);
         orgService.getUserProfileHandler().removeUserProfile(userName, false);
      }
      catch (Exception e)
      {
         log.info("Cannot cleanup user relationships: " + userName + "; ", e);

      }

      User exoUser = getPopulatedUser(userName, session);

      if (broadcast)
      {
         preDelete(exoUser);
      }

      try
      {
         session.getPersistenceManager().removeUser(foundUser, true);
      }
      catch (IdentityException e)
      {
         log.info("Cannot remove user: " + userName + "; ", e);
View Full Code Here


   }

   //
   public User findUserByName(String userName) throws Exception
   {
      IdentitySession session = service_.getIdentitySession();

      User user = getPopulatedUser(userName, session);

      return user;
   }
View Full Code Here

      }
      else
      {
         try
         {
            IdentitySession session = service_.getIdentitySession();
            org.picketlink.idm.api.User idmUser = session.getPersistenceManager().findUser(user.getUserName());

            authenticated = session.getAttributesManager().validatePassword(idmUser, password);
         }
         catch (Exception e)
         {
            log.info("Cannot authenticate user: " + username + "; ",  e);
View Full Code Here

      return new LazyPageList(new IDMUserListAccess(this, service_, qb, 20, false), 20);
   }

   public User findUserByEmail(String email) throws Exception
   {
      IdentitySession session = service_.getIdentitySession();


      org.picketlink.idm.api.User plUser = null;

      try
      {
         plUser = session.getAttributesManager().findUserByUniqueAttribute(USER_EMAIL, email);
      }
      catch (IdentityException e)
      {
         log.info("Cannot find user by email: " + email + "; ", e );
View Full Code Here

TOP

Related Classes of org.picketlink.idm.api.IdentitySession

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.