1 2 Previous Next 21 Replies Latest reply on May 20, 2011 12:45 PM by zarathos Go to original post
      • 15. Re: GateIn and SSO
        nibha

        Hi,

         

        Can anybody tell  gatein 3.1 supports which version of seam nd rich faces.

        I want to deploy a seam portlet using gatein instead of Jboss 4.3 CP05 AS

        what should be my inital steps

        • 16. Re: GateIn and SSO
          trong.tran

          Hi James,

           

          What you received like "rememberme#######" is not a original password but is just considered as a token. Then the token will be validated by TransientTokenService/CookieTokenService to return good Credentials

           

          I let you take a look at https://anonsvn.jboss.org/repos/gatein/portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java as an example

          • 17. Re: GateIn and SSO
            zarathos

            Thanks for replying, I really appreciate it.

             

            I have actually tried validate on both the TransientTokenService/CookieTokenService:

             

            ....
                 log.debug("***--- token: try validateToken");
                 Object o = getTokenService().validateToken(password, true);
                 if (o != null && (o instanceof org.exoplatform.web.security.Credentials))


                      org.exoplatform.web.security.Credentials creds = null;
                      creds = (org.exoplatform.web.security.Credentials) o;


                      credentials = new Credential[] {
                                        new UsernameCredential(creds.getUsername()),
                                        new PasswordCredential(creds.getPassword())

                 } else {
                      log.debug("***--- token: try Cookie");
                      o = ((CookieTokenService) getContainer().getComponentInstanceOfType(
                                CookieTokenService.class)).validateToken(password, false);


                      if (o != null && (o instanceof org.exoplatform.web.security.Credentials)) {


                           org.exoplatform.web.security.Credentials creds = null;
                           creds = (org.exoplatform.web.security.Credentials) o;


                           credentials = new Credential[] {
                                new UsernameCredential(creds.getUsername()),
                                new PasswordCredential(creds.getPassword()) };


                      } else {

            ....

             

            Unfortunately, in all cases, the object (o) returned is null.  However, I was able to find the original password with the follow; but am not sure if this is a good practice or if I can guarrantee the value will always be available.

            ...

                 if (password.startsWith(InitiateLoginServlet.COOKIE_NAME)) {
                      password = (String) sharedState.get("javax.security.auth.login.password");
                 }
                 log.debug("***--- paas: " + password);
                 credentials = new Credential[] {
                      new UsernameCredential(username),
                      new PasswordCredential(password) };

            ...


            Thanks again for responding!!!


            James..

            • 18. Re: GateIn and SSO
              oli83

              Hey,

               

              Try this :

               

              ExoContainer container = this.getContainer();
              Object o = ((TransientTokenService) container

                              .getComponentInstanceOfType(TransientTokenService.class)).validateToken(password, true);

              • 19. GateIn and SSO
                kkas

                Hi.

                 

                Does anybody tried the "sso-packaging-1.0.0-Beta02.zip" with openAM?

                By reading all the posted comments in here, openAM has not been supported yet(which means, the package doesnot work with openAM).

                Is this correct??

                 

                I want to know if the package is really not compatible with openAM framework...

                (I have tried with it once and it did not work. but I just want to make sure that was not because of my mis-configuration.)

                 

                Thank you,

                Kenta

                • 20. GateIn and SSO
                  kkas

                  I will close my privious comment and open a new discussion about compatibility with OpenAM because no one seems to reply ( maybe not noticed?)

                   

                  Thank you,

                  Kenta

                  • 21. Re: GateIn and SSO
                    zarathos

                    Attempted that in line #2 -

                    Object o = getTokenService().validateToken(password, true);

                     

                     

                    James..

                    1 2 Previous Next