1 Reply Latest reply on Jun 19, 2007 11:29 AM by koenhandekyn

    seam app + another app using SSO

    leezard

      Hi all,

      I have main application written in Struts and I need to link my smaller seam application with it using SSO. What I need to do is:
      - user clicks specified link at the main application's page with url parameter and gets into seam application where some pageflows / actions are preformed. After finished conversation I need to redirect user back to main application's page (this one he cliked link at). How can I achieve this? How to write navigation rules? How should I specify view-id or sth? Assume I have no security yet so Seam application is available for all users.

        • 1. Re: seam app + another app using SSO
          koenhandekyn

          i don't know if this is going to help you but i sovled a related issue for single sign on as described below to log in to my seam application from a URL.

          usage : https://host:port/appdomain/SingleSignOn.seam?login=aaa&password=bbb

          for your problem, i guess a similar approach could be taken, while also consuming an extra parameter being the url parameter.

          at the end of the flow you than can redirect to the original URL with

          @In("#{facesContext.externalContext}")
           private ExternalContext externalContext;


          and

          externalContext.redirect(documentURL);




          a quick and dirty approach I use:

          from pages.xml

          <page view-id="/singleSignOn.xhtml"
           action="#{identity.login}">
           <navigation from-action="#{identity.login}">
           <rule if="#{identity.loggedIn}">
           <redirect view-id="/home.xhtml"/>
           </rule>
           </navigation>
           </page>


          with an empty singleSignOn.xhtml page

          while reading two request parameters within my AuthenticationAction bean

          @Stateless
          @Name("authenticator")
          public class AuthenticatorAction implements AuthenticatorI {
          
           @Logger
           Log log;
          
           @RequestParameter
           String login;
          
           @RequestParameter
           String password;
          
          ...