View Javadoc

    1   /*
    2    * Copyright [2007] [University Corporation for Advanced Internet Development, Inc.]
    3    *
    4    * Licensed under the Apache License, Version 2.0 (the "License");
    5    * you may not use this file except in compliance with the License.
    6    * You may obtain a copy of the License at
    7    *
    8    * http://www.apache.org/licenses/LICENSE-2.0
    9    *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16
    17  package edu.internet2.middleware.shibboleth.idp.config.profile;
    18
    19  import javax.xml.namespace.QName;
    20
    21  import edu.internet2.middleware.shibboleth.common.config.BaseSpringNamespaceHandler;
    22  import edu.internet2.middleware.shibboleth.common.config.profile.JSPErrorHandlerBeanDefinitionParser;
    23  import edu.internet2.middleware.shibboleth.common.config.profile.VelocityErrorHandlerBeanDefinitionParser;
    24  import edu.internet2.middleware.shibboleth.idp.config.profile.authn.IPAddressLoginHandlerBeanDefinitionParser;
    25  import edu.internet2.middleware.shibboleth.idp.config.profile.authn.PreviousSessionLoginHandlerBeanDefinitionParser;
    26  import edu.internet2.middleware.shibboleth.idp.config.profile.authn.RemoteUserLoginHandlerBeanDefinitionParser;
    27  import edu.internet2.middleware.shibboleth.idp.config.profile.authn.UsernamePasswordLoginHandlerBeanDefinitionParser;
    28  import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1ArtifactResolutionProfileHanderBeanDefinitionParser;
    29  import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1AttributeQueryProfileHandlerBeanDefinitionParser;
    30  import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.ShibbolethSSOProfileHandlerBeanDefinitionParser;
    31  import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser;
    32  import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2AttributeQueryProfileHandlerBeanDefinitionParser;
    33  import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2SSOProfileHandlerBeanDefinitionParser;
    34
    35  /**
    36   * Spring namespace handler for profile handler configurations.
    37   */
    38  public class ProfileHandlerNamespaceHandler extends BaseSpringNamespaceHandler {
    39
    40      /** Namespace URI. */
    41      public static final String NAMESPACE = "urn:mace:shibboleth:2.0:idp:profile-handler";
    42
    43      /** {@inheritDoc} */
    44      public void init() {
    45          registerBeanDefinitionParser(IdPProfileHandlerManagerBeanDefinitionParser.SCHEMA_TYPE,
    46                  new IdPProfileHandlerManagerBeanDefinitionParser());
    47
    48          registerBeanDefinitionParser(ProfileHandlerGroupBeanDefinitionParser.SCHEMA_TYPE,
    49                  new ProfileHandlerGroupBeanDefinitionParser());
    50
    51          registerBeanDefinitionParser(StatusHandlerBeanDefinitionParser.SCHEMA_TYPE,
    52                  new StatusHandlerBeanDefinitionParser());
    53
    54          registerBeanDefinitionParser(new QName(NAMESPACE, JSPErrorHandlerBeanDefinitionParser.ELEMENT_NAME),
    55                  new JSPErrorHandlerBeanDefinitionParser());
    56
    57          registerBeanDefinitionParser(new QName(NAMESPACE, VelocityErrorHandlerBeanDefinitionParser.ELEMENT_NAME),
    58                  new VelocityErrorHandlerBeanDefinitionParser());
    59
    60          registerBeanDefinitionParser(SAMLMetadataHandlerBeanDefinitionParser.SCHEMA_TYPE,
    61                  new SAMLMetadataHandlerBeanDefinitionParser());
    62
    63          registerBeanDefinitionParser(ShibbolethSSOProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    64                  new ShibbolethSSOProfileHandlerBeanDefinitionParser());
    65
    66          registerBeanDefinitionParser(SAML1AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    67                  new SAML1AttributeQueryProfileHandlerBeanDefinitionParser());
    68
    69          registerBeanDefinitionParser(SAML1ArtifactResolutionProfileHanderBeanDefinitionParser.SCHEMA_TYPE,
    70                  new SAML1ArtifactResolutionProfileHanderBeanDefinitionParser());
    71
    72          registerBeanDefinitionParser(SAML2SSOProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    73                  new SAML2SSOProfileHandlerBeanDefinitionParser());
    74
    75          registerBeanDefinitionParser(SAML2AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    76                  new SAML2AttributeQueryProfileHandlerBeanDefinitionParser());
    77
    78          registerBeanDefinitionParser(SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    79                  new SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser());
    80
    81          registerBeanDefinitionParser(PreviousSessionLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    82                  new PreviousSessionLoginHandlerBeanDefinitionParser());
    83
    84          registerBeanDefinitionParser(RemoteUserLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    85                  new RemoteUserLoginHandlerBeanDefinitionParser());
    86
    87          registerBeanDefinitionParser(UsernamePasswordLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    88                  new UsernamePasswordLoginHandlerBeanDefinitionParser());
    89
    90          registerBeanDefinitionParser(IPAddressLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    91                  new IPAddressLoginHandlerBeanDefinitionParser());
    92      }
    93  }