Examples of SamlIdpSession


Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

            throw new RuntimeException(e);
        }
    }

    public void handleLogin(String userName, HttpServletResponse response) {
        SamlIdpSession session = idpApi.get().localLogin(idpApi.get().createNameId(userName, null, null), null);
        dialogueManager.attachDialogue(dialogueId);
        idpApi.get().authenticationSucceeded(session, response);
        dialogueManager.detachDialogue();
    }
View Full Code Here

Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

        boolean readyForNow = false;

        while (!readyForNow) {
            // Find the next session that matches with the removal criteria and
            // that has not been removed yet.
            SamlIdpSession sessionToRemove = null;
            for (SamlIdpSession session : samlIdpSessions.getSessions()) {
                if (session.getPrincipal().getNameId().equals(samlNameId)) {
                    if (sessionIndexes == null || sessionIndexes.size() == 0 || sessionIndexes.contains(((SamlIdpSessionImpl) session).getSessionIndex())) {
                        sessionToRemove = session;
                        break;
                    }
                }
            }

            if (sessionToRemove != null) {
                if (sessionToRemove.getServiceProviders().size() != 0) {
                    // For the session that is about to be removed, get the first
                    // service provider that participates in the session. Remove it
                    // from the session.
                    SamlExternalServiceProvider sp = sessionToRemove.getServiceProviders().iterator().next();
                    sessionToRemove.getServiceProviders().remove(sp);

                    // If the session participant is not the party that initiated the
                    // single logout, and it has a single logout service, send a
                    // single logout request. Otherwise, move on to the next session
                    // participant (if available) or to the next session.
View Full Code Here

Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

    public void localLogin(SamlNameId nameId, List<AttributeType> attributes) {
        multiUserApi.get().localLogin(nameId, attributes);
    }

    public void remoteLogin(String spEntityId, String remoteUrl, HttpServletResponse response) {
        SamlIdpSession session = getSession();
        if (session == null) {
            throw new IllegalStateException("Need to login locally first.");
        }
        multiUserApi.get().remoteLogin(spEntityId, session, remoteUrl, response);
    }
View Full Code Here

Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

        }
        multiUserApi.get().remoteLogin(spEntityId, session, remoteUrl, response);
    }

    public void localLogout() {
        SamlIdpSession session = getSession();
        if (session == null) {
            throw new IllegalStateException("Logout not possible because there is no current session.");
        }
        multiUserApi.get().localLogout(session);
    }
View Full Code Here

Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

        }
        multiUserApi.get().localLogout(session);
    }

    public void globalLogout(HttpServletResponse response) {
        SamlIdpSession session = getSession();
        if (session == null) {
            throw new IllegalStateException("Logout not possible because there is no current session.");
        }
        multiUserApi.get().globalLogout(session, response);
    }
View Full Code Here

Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

      while (!readyForNow)
      {
         // Find the next session that matches with the removal criteria and
         // that has not been removed yet.
         SamlIdpSession sessionToRemove = null;
         for (SamlIdpSession session : samlIdpSessions.getSessions())
         {
            if (session.getPrincipal().getNameId().equals(samlNameId))
            {
               if (sessionIndexes == null || sessionIndexes.size() == 0 || sessionIndexes.contains(((SamlIdpSessionImpl) session).getSessionIndex()))
               {
                  sessionToRemove = session;
                  break;
               }
            }
         }

         if (sessionToRemove != null)
         {
            if (sessionToRemove.getServiceProviders().size() != 0)
            {
               // For the session that is about to be removed, get the first
               // service provider that participates in the session. Remove it
               // from the session.
               SamlExternalServiceProvider sp = sessionToRemove.getServiceProviders().iterator().next();
               sessionToRemove.getServiceProviders().remove(sp);

               // If the session participant is not the party that initiated the
               // single logout, and it has a single logout service, send a
               // single logout request. Otherwise, move on to the next session
               // participant (if available) or to the next session.
View Full Code Here

Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

      multiUserApi.get().localLogin(nameId, attributes);
   }

   public void remoteLogin(String spEntityId, String remoteUrl, HttpServletResponse response)
   {
      SamlIdpSession session = getSession();
      if (session == null)
      {
         throw new IllegalStateException("Need to login locally first.");
      }
      multiUserApi.get().remoteLogin(spEntityId, session, remoteUrl, response);
View Full Code Here

Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

      multiUserApi.get().remoteLogin(spEntityId, session, remoteUrl, response);
   }

   public void localLogout()
   {
      SamlIdpSession session = getSession();
      if (session == null)
      {
         throw new IllegalStateException("Logout not possible because there is no current session.");
      }
      multiUserApi.get().localLogout(session);
View Full Code Here

Examples of org.jboss.seam.security.external.saml.api.SamlIdpSession

      multiUserApi.get().localLogout(session);
   }

   public void globalLogout(HttpServletResponse response)
   {
      SamlIdpSession session = getSession();
      if (session == null)
      {
         throw new IllegalStateException("Logout not possible because there is no current session.");
      }
      multiUserApi.get().globalLogout(session, response);
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.