Search in sources :

Example 1 with DefaultIDPAdapter

use of com.sun.identity.saml2.plugins.DefaultIDPAdapter in project OpenAM by OpenRock.

the class UtilProxyIDPRequestValidator method getIDPAdapter.

/**
     * Loads the {@link SAML2IdentityProviderAdapter} IDP adapter which will be called as part
     * of IDP processing.
     *
     * @param realm Possibly null realm.
     * @param idpEntityID Non null idpEntityID.
     *
     * @return The loaded {@link SAML2IdentityProviderAdapter} if it could be loaded otherwise
     * the default implementation {@link DefaultIDPAdapter}.
     */
public SAML2IdentityProviderAdapter getIDPAdapter(String realm, String idpEntityID) {
    SAML2IdentityProviderAdapter r;
    if (idpEntityID == null) {
        if (debug.errorEnabled())
            debug.error("No IDP Entity ID provided");
        r = new DefaultIDPAdapter();
    } else {
        try {
            r = IDPSSOUtil.getIDPAdapterClass(realm, idpEntityID);
        } catch (SAML2Exception se2) {
            debug.error("Unexpected error instantiating IDP Adapter: {0}", se2.getMessage(), se2);
            r = new DefaultIDPAdapter();
        }
    }
    debug.message("Using IDP Adapter class: {0}", r.getClass().getSimpleName());
    return r;
}
Also used : SAML2Exception(com.sun.identity.saml2.common.SAML2Exception) DefaultIDPAdapter(com.sun.identity.saml2.plugins.DefaultIDPAdapter) SAML2IdentityProviderAdapter(com.sun.identity.saml2.plugins.SAML2IdentityProviderAdapter)

Aggregations

SAML2Exception (com.sun.identity.saml2.common.SAML2Exception)1 DefaultIDPAdapter (com.sun.identity.saml2.plugins.DefaultIDPAdapter)1 SAML2IdentityProviderAdapter (com.sun.identity.saml2.plugins.SAML2IdentityProviderAdapter)1