Package org.exoplatform.services.security

Examples of org.exoplatform.services.security.Identity


      {
         for (Membership membership : memberships)
            entries.add(new MembershipEntry(membership.getGroupId(), membership.getMembershipType()));
      }
      if (rolesExtractor == null)
         return new Identity(userId, entries);
      return new Identity(userId, entries, rolesExtractor.extractRoles(userId, entries));
   }
View Full Code Here


      }

      SessionFactory sessionFactory = (SessionFactory)container.getComponentInstanceOfType(SessionFactory.class);

      ConversationState newState =
         new ConversationState(new Identity(name, userState.getIdentity().getMemberships(), userState.getIdentity()
            .getRoles()));
      return sessionFactory.createSession(newState);

   }
View Full Code Here

    *
    * @return System session
    */
   public static SessionProvider createAnonimProvider()
   {
      Identity id = new Identity(SystemIdentity.ANONIM, new HashSet<MembershipEntry>());
      return new SessionProvider(new ConversationState(id));
   }
View Full Code Here

        if (authenticator == null) {
            throw new LoginException("No Authenticator component found, check your configuration");
        }

        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

      ConversationState state = ConversationState.getCurrent();

      if (state == null)
      {
         log.debug("No current identity found, ANONYMOUS one will be used");
         return new ConversationState(new Identity(SystemIdentity.ANONIM, new HashSet<MembershipEntry>()));
      }

      ConversationState.setCurrent(state);
      return state;
View Full Code Here

            "Credentials for the authentication should be CredentialsImpl or SimpleCredentials type");

      SessionFactory sessionFactory = (SessionFactory)container.getComponentInstanceOfType(SessionFactory.class);

      ConversationState newState =
         new ConversationState(new Identity(name, userState.getIdentity().getMemberships(), userState.getIdentity()
            .getRoles()));
      return sessionFactory.createSession(newState);

   }
View Full Code Here

            "Credentials for the authentication should be CredentialsImpl or SimpleCredentials type");

      SessionFactory sessionFactory = (SessionFactory)container.getComponentInstanceOfType(SessionFactory.class);

      ConversationState newState =
         new ConversationState(new Identity(name, userState.getIdentity().getMemberships(), userState.getIdentity()
            .getRoles()));
      return sessionFactory.createSession(newState);

   }
View Full Code Here

      }

      SessionFactory sessionFactory = (SessionFactory)container.getComponentInstanceOfType(SessionFactory.class);

      ConversationState newState =
         new ConversationState(new Identity(name, userState.getIdentity().getMemberships(), userState.getIdentity()
            .getRoles()));
      return sessionFactory.createSession(newState);

   }
View Full Code Here

      super.setUp();

      sesProv =
         (ThreadLocalSessionProviderService)container
            .getComponentInstanceOfType(ThreadLocalSessionProviderService.class);
      sesProv.setSessionProvider(null, new SessionProvider(new ConversationState(new Identity("root"))));
      binder = (ResourceBinder)container.getComponentInstanceOfType(ResourceBinder.class);
      resourceNumber = binder.getSize();
      RequestHandler handler = (RequestHandler)container.getComponentInstanceOfType(RequestHandler.class);

      testRoot = root.addNode("testRoot", "nt:unstructured");
View Full Code Here

      handler = (RequestHandler)container.getComponentInstanceOfType(RequestHandler.class);

      SessionProviderService sessionProviderService =
         (SessionProviderService)container.getComponentInstanceOfType(ThreadLocalSessionProviderService.class);
      assertNotNull(sessionProviderService);
      sessionProviderService.setSessionProvider(null, new SessionProvider(new ConversationState(new Identity("root"))));
   }
View Full Code Here

TOP

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

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.