View Javadoc

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