Package org.apache.portals.applications.webcontent.proxy.impl

Examples of org.apache.portals.applications.webcontent.proxy.impl.DefaultSSOSiteCredentials


                   
                    if (ssoUsers != null)
                    {
                        for (SSOUser ssoUser : ssoUsers)
                        {
                            DefaultSSOSiteCredentials ssoCreds = new DefaultSSOSiteCredentials(ssoSite.getURL(), siteURI.getHost(), siteURI.getPort());
                           
                            if (!StringUtils.isBlank(ssoSite.getRealm()))
                            {
                                ssoCreds.setRealm(ssoSite.getRealm());
                            }
                           
                            PasswordCredential pwc = ssoManager.getCredentials(ssoUser);
                            ssoCreds.setUsername(pwc.getUserName());
                            ssoCreds.setPassword(pwc.getPassword());
                           
                            if (ssoSite.isFormAuthentication())
                            {
                                ssoCreds.setFormAuthentication(true);
                                ssoCreds.setFormUserField(ssoSite.getFormUserField());
                                ssoCreds.setFormPwdField(ssoSite.getFormPwdField());
                            }
                           
                            ssoSiteCredsOfSubject.add(ssoCreds);
                        }
                    }
View Full Code Here


    {
        session = new MockHttpSession();
       
        ssoSiteCredsOfSubject = new ArrayList<SSOSiteCredentials>();
       
        DefaultSSOSiteCredentials siteCreds = new DefaultSSOSiteCredentials("http://www.localhost.com", "www.localhost.com");
        siteCreds.setUsername("admin");
        siteCreds.setPassword("admin");
        ssoSiteCredsOfSubject.add(siteCreds);
       
        siteCreds = new DefaultSSOSiteCredentials("http://www.localhost.com/basicauth", "www.localhost.com");
        siteCreds.setUsername("basic");
        siteCreds.setPassword("basic");
        ssoSiteCredsOfSubject.add(siteCreds);

        siteCreds = new DefaultSSOSiteCredentials("http://www.localhost.com/formauth", "www.localhost.com");
        siteCreds.setFormAuthentication(true);
        siteCreds.setFormUserField("user");
        siteCreds.setFormPwdField("pass");
        siteCreds.setUsername("form");
        siteCreds.setPassword("form");
        ssoSiteCredsOfSubject.add(siteCreds);
       
        session.setAttribute(SSOReverseProxyIFramePortlet.SUBJECT_SSO_SITE_CREDS, ssoSiteCredsOfSubject);
    }
View Full Code Here

TOP

Related Classes of org.apache.portals.applications.webcontent.proxy.impl.DefaultSSOSiteCredentials

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.