/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: SAML2IDPProxyImpl.java,v 1.5 2009/03/12 20:33:40 huacui Exp $
*/
/**
* This class <code>SAML2IDPProxyImpl</code> is used to find a preferred Identity
* Authenticating provider to proxy the authentication request.
*/
/**
* Default Constructor.
*/
public SAML2IDPProxyImpl(){}
/**
* Returns a list of preferred IDP providerIDs.
* @param authnRequest original authnrequest
* @param hostProviderID ProxyIDP providerID.
* @param realm Realm
* @param request HttpServletRequest
* @param response HttpServletResponse
* @return a list of providerID's of the authenticating providers to be
* proxied or <code>null</code> to disable the proxying and continue
* for the localauthenticating provider.
* @exception SAML2Exception if error occurs.
*/
) throws SAML2Exception
{
}
try {
// Retreive MetaData
throw new SAML2Exception(
}
if (spEntityCfg != null) {
}
if (useIntroductionForProxying == null ||
{
}
"Preferred IDPs are null.");
return null;
}
return providerIDs;
} else {
/* IDP Proxy with introduction cookie case*/
"discovery reader URL = " + readerURL);
}
"Redirect url = " + redirectURL);
}
if (redirectURL != null) {
return providerIDs;
}
}
}
return null;
} catch (SAML2MetaException ex) {
"meta Exception in retrieving the preferred IDP", ex);
return null;
} catch (COTException sme) {
"Error retreiving COT ",sme);
return null;
} catch (Exception e) {
"Exception in retrieving the preferred IDP", e);
return null;
}
}
}