Package org.exoplatform.services.security

Examples of org.exoplatform.services.security.IdentityRegistry.register()


                  Authenticator authenticator =
                     (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
                  try
                  {
                     identity = authenticator.createIdentity(userId);
                     identityRegistry.register(identity);
                  }
                  catch (Exception e)
                  {
                     log.error("Unable restore identity. " + e.getMessage(), e);
                  }
View Full Code Here


         // Do not need implement logout by self if use tomcat 6.0.21 and later.
         // See deprecation comments in
         // org.exoplatform.services.security.web.JAASConversationStateListener
         identity.setSubject(subject);

         identityRegistry.register(identity);

      }
      catch (Exception e)
      {
         log.error(e.getMessage());
View Full Code Here

         // TODO Remove subject from identity if nod need it in eXo environment.
         // Do not need implement logout by self if use tomcat 6.0.21 and later.
         // See deprecation comments in
         // org.exoplatform.services.security.web.JAASConversationStateListener
         identity.setSubject(subject);
         identityRegistry.register(identity);

      }
      catch (final Throwable e)
      {
         log.error(e.getLocalizedMessage());
View Full Code Here

      Credential[] credentials =
         new Credential[]{new UsernameCredential(this.userName), new PasswordCredential(this.userPass)};

      this.userId = authenticator.validateUser(credentials);
      Identity identity = authenticator.createIdentity(this.userId);
      identityRegistry.register(identity);

      ConversationState state = new ConversationState(identity);
      // keep subject as attribute in ConversationState
      state.setAttribute(ConversationState.SUBJECT, identity.getSubject());
View Full Code Here

            throw new LoginException("User " + userId + " already logined.");

         Identity identity = authenticator.createIdentity(userId);
         identity.setSubject(subject);

         identityRegistry.register(identity);

      }
      catch (Exception e)
      {
         e.printStackTrace();
View Full Code Here

         if (singleLogin && identityRegistry.getIdentity(identity.getUserId()) != null)
            throw new LoginException("User " + identity.getUserId() + " already logined.");

         identity.setSubject(subject);
         identityRegistry.register(identity);

      }
      catch (final Throwable e)
      {
         log.error(e.getLocalizedMessage());
View Full Code Here

          // already logged in
          return true;
        }

        this.identity.setSubject(this.subject);
        identityRegistry.register(this.identity);

        return true;
      }
      else
      {
View Full Code Here

         // TODO Remove subject from identity if nod need it in eXo environment.
         // Do not need implement logout by self if use tomcat 6.0.21 and later.
         // See deprecation comments in
         // org.exoplatform.services.security.web.JAASConversationStateListener
         identity.setSubject(subject);
         identityRegistry.register(identity);

      }
      catch (final Throwable e)
      {
         log.error(e.getLocalizedMessage());
View Full Code Here

                  Authenticator authenticator =
                     (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
                  try
                  {
                     identity = authenticator.createIdentity(userId);
                     identityRegistry.register(identity);
                  }
                  catch (Exception e)
                  {
                     log.error("Unable restore identity. " + e.getMessage(), e);
                  }
View Full Code Here

         // Do not need implement logout by self if use tomcat 6.0.21 and later.
         // See deprecation comments in
         // org.exoplatform.services.security.web.JAASConversationStateListener
         identity.setSubject(subject);

         identityRegistry.register(identity);

      }
      catch (Exception e)
      {
         e.printStackTrace();
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.