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.ExternalAuthnSystemLoginHandlerBeanDefinitionParser;
    25  import edu.internet2.middleware.shibboleth.idp.config.profile.authn.IPAddressLoginHandlerBeanDefinitionParser;
    26  import edu.internet2.middleware.shibboleth.idp.config.profile.authn.PreviousSessionLoginHandlerBeanDefinitionParser;
    27  import edu.internet2.middleware.shibboleth.idp.config.profile.authn.RemoteUserLoginHandlerBeanDefinitionParser;
    28  import edu.internet2.middleware.shibboleth.idp.config.profile.authn.UsernamePasswordLoginHandlerBeanDefinitionParser;
    29  import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1ArtifactResolutionProfileHanderBeanDefinitionParser;
    30  import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1AttributeQueryProfileHandlerBeanDefinitionParser;
    31  import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.ShibbolethSSOProfileHandlerBeanDefinitionParser;
    32  import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser;
    33  import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2AttributeQueryProfileHandlerBeanDefinitionParser;
    34  import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2ECPProfileHandlerBeanDefinitionParser;
    35  import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2SSOProfileHandlerBeanDefinitionParser;
    36
    37  /**
    38   * Spring namespace handler for profile handler configurations.
    39   */
    40  public class ProfileHandlerNamespaceHandler extends BaseSpringNamespaceHandler {
    41
    42      /** Namespace URI. */
    43      public static final String NAMESPACE = "urn:mace:shibboleth:2.0:idp:profile-handler";
    44
    45      /** {@inheritDoc} */
    46      public void init() {
    47          registerBeanDefinitionParser(IdPProfileHandlerManagerBeanDefinitionParser.SCHEMA_TYPE,
    48                  new IdPProfileHandlerManagerBeanDefinitionParser());
    49
    50          registerBeanDefinitionParser(ProfileHandlerGroupBeanDefinitionParser.SCHEMA_TYPE,
    51                  new ProfileHandlerGroupBeanDefinitionParser());
    52
    53          registerBeanDefinitionParser(StatusHandlerBeanDefinitionParser.SCHEMA_TYPE,
    54                  new StatusHandlerBeanDefinitionParser());
    55
    56          registerBeanDefinitionParser(new QName(NAMESPACE, JSPErrorHandlerBeanDefinitionParser.ELEMENT_NAME),
    57                  new JSPErrorHandlerBeanDefinitionParser());
    58
    59          registerBeanDefinitionParser(new QName(NAMESPACE, VelocityErrorHandlerBeanDefinitionParser.ELEMENT_NAME),
    60                  new VelocityErrorHandlerBeanDefinitionParser());
    61
    62          registerBeanDefinitionParser(SAMLMetadataHandlerBeanDefinitionParser.SCHEMA_TYPE,
    63                  new SAMLMetadataHandlerBeanDefinitionParser());
    64
    65          registerBeanDefinitionParser(ShibbolethSSOProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    66                  new ShibbolethSSOProfileHandlerBeanDefinitionParser());
    67
    68          registerBeanDefinitionParser(SAML1AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    69                  new SAML1AttributeQueryProfileHandlerBeanDefinitionParser());
    70
    71          registerBeanDefinitionParser(SAML1ArtifactResolutionProfileHanderBeanDefinitionParser.SCHEMA_TYPE,
    72                  new SAML1ArtifactResolutionProfileHanderBeanDefinitionParser());
    73
    74          registerBeanDefinitionParser(SAML2SSOProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    75                  new SAML2SSOProfileHandlerBeanDefinitionParser());
    76
    77          registerBeanDefinitionParser(SAML2ECPProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    78                  new SAML2ECPProfileHandlerBeanDefinitionParser());
    79
    80          registerBeanDefinitionParser(SAML2AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    81                  new SAML2AttributeQueryProfileHandlerBeanDefinitionParser());
    82
    83          registerBeanDefinitionParser(SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
    84                  new SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser());
    85
    86          registerBeanDefinitionParser(PreviousSessionLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    87                  new PreviousSessionLoginHandlerBeanDefinitionParser());
    88
    89          registerBeanDefinitionParser(RemoteUserLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    90                  new RemoteUserLoginHandlerBeanDefinitionParser());
    91
    92          registerBeanDefinitionParser(ExternalAuthnSystemLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    93                  new ExternalAuthnSystemLoginHandlerBeanDefinitionParser());
    94
    95          registerBeanDefinitionParser(UsernamePasswordLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    96                  new UsernamePasswordLoginHandlerBeanDefinitionParser());
    97
    98          registerBeanDefinitionParser(IPAddressLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
    99                  new IPAddressLoginHandlerBeanDefinitionParser());
    100     }
    101 }