• 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • JASPIC

    Table of Contents

    Introduction

    七乐彩开奖结果 www.eleieg.com Tomcat implements JASPIC 1.1 Maintenance Release B (JSR 196). The implementation is primarily intended to enable the integration of 3rd party JASPIC authentication implementations with Tomcat.

    JASPIC may be configured dynamically by an application or statically via the $CATALINA_BASE/conf/jaspic-providers.xml configuration file. If present, a JASPIC configuration will over-ride any <login-config> present in web.xml.

    Static configuration

    AuthConfigProvider

    If the 3rd party implementation includes an AuthConfigProvider then a web application can be configured to use it by nesting the following inside the <jaspic-providers> element in $CATALINA_BASE/conf/jaspic-providers.xml.

    <provider name="any"
              className="fully.qualified.implementation.class.Name"
              layer="HttpServlet"
              appContext="Catalina/localhost /contextPath"
              description="any">
      <property name="see-provider-documentation"
                value="see-provider-documentation" />
    </provider>

    The name and description attributes are not used by Tomcat.

    The className attribute must be the fully qualified class name of the AuthConfigProvider. The implementation may be packaged with the web application or in Tomcat's $CATALINA_BASE/lib directory.

    The layer attribute must be HttpServlet.

    The appContext attribute must be exactly the concatenation of:

    • The engine name
    • The forward slash character
    • The host name
    • A single space
    • The context path

    If the AuthConfigProvider supports configuration via properties these may be specified via <property> elements nesting inside the <provide> element.

    ServerAuthModule

    If the 3rd party implementation only provides an ServerAuthModule then it will be necessary to provide a number of supporting classes. These may be a custom implementation or, alternatively, Tomcat provides a simple wrapper implementation for ServerAuthModules.

    Tomcat's wrapper for ServerAuthModule can be configured by nesting the following inside the <jaspic-providers> element in $CATALINA_BASE/conf/jaspic-providers.xml.

    <provider name="any"
              className="org.apache.catalina.authenticator.jaspic.SimpleAuthConfigProvider"
              layer="HttpServlet"
              appContext="Catalina/localhost /contextPath"
              description="any">
      <property name="org.apache.catalina.authenticator.jaspic.ServerAuthModule.1"
                value="fully.qualified.implementation.class.Name" />
      <property name="see-provider-documentation"
                value="see-provider-documentation" />
    </provider>

    The configuration is similar to the AuthConfigProvider in the previous section but with some key differences.

    The className attribute must be org.apache.catalina.authenticator.jaspic.SimpleAuthConfigProvider.

    The ServerAuthModule(s) are specified via properties. The property name must be org.apache.catalina.authenticator.jaspic.ServerAuthModule.n where n is the index of the module. The index must start at 1 an increment in steps of 1 until all modules are defined. The value of the property must be the fully qualified class name of the module.

    Dynamic configuration

    JASPIC modules and configuration can be packaged within a WAR file with the web application. The web application can then register the required JASPIC configuration when it starts using the standard JASPIC APIs.

    If parallel deployment is being used then dynamic configuration should not be used. The JASPIC API assumes that a context path is unique for any given host which is not the case when using parallel deployment. When using parallel deployment, static JASPIC configuration should be used. This will require that all versions of the application use the same JASPIC configuration.

    3rd party modules

    This is not an exhaustive list. The Tomcat community welcomes contributions that add to this section.

    Philip Green II's module for Google OAuth 2

    The source code for this module along with the documentation which includes details of the necessary Google API configuration is available on GitHub.

    A sample configuration for using this module with Tomcat would look like this:

    <jaspic-providers xmlns="//tomcat.apache.org/xml"
                      xmlns:xsi="//www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="//tomcat.apache.org/xml jaspic-providers.xsd"
                      version="1.0">
      <provider name="google-oauth"
                className="org.apache.catalina.authenticator.jaspic.SimpleAuthConfigProvider"
                layer="HttpServlet"
                appContext="Catalina/localhost /contextPath"
                description="Google OAuth test">
        <property name="org.apache.catalina.authenticator.jaspic.ServerAuthModule.1"
                  value="com.idmworks.security.google.GoogleOAuthServerAuthModule" />
        <property name="oauth.clientid"
                  value="obtained-from-Google-console" />
        <property name="oauth.clientsecret"
                  value="obtained-from-Google-console" />
        <property name="ignore_missing_login_context"
                  value="true" />
      </provider>
    </jaspic-providers>

    Comments

    Notice: This comments section collects your suggestions on improving documentation for Apache Tomcat.

    If you have trouble and need help, read Find Help page and ask your question on the tomcat-users 七乐彩开奖结果. Do not ask such questions here. This is not a Q&A section.

    The Apache Comments System is explained here. Comments may be removed by our moderators if they are either implemented or considered invalid/off-topic.

  • 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • 广西十三水棋牌游戏 广东省11选5彩乐乐 七星彩走势图最近50期 谁有好的北京赛车软件下载 yy游戏大厅三张牌透视 310足球直播视频直播 p3体彩比福少点 新疆十一选五一定牛走势图 宁夏福利彩票官网 极速快3开奖结果 炸金花图标 全天人工精准计划在线 千里马免费计划软件 江苏快三神赞不连挂计划 pk10三线一码无连错