繁体   English   中英

Integration of Spengo with Java Jersey Rest Api having tomcat server

[英]Integration of Spengo with Java Jersey Rest Api having tomcat server

We are planning to build Spengo authentication with Java Jersey Rest Api with a tomcat server. 我找不到有关此集成的适当博客。

请建议任何没有 Spring 安全性的工作博客。

SPNEGO 可通过SpnegoAuthenticator开箱即用。 为了启用它,您需要:

  1. web.xml描述符中将SPNEGO设置为身份验证方法:
<login-config>
    <auth-method>SPNEGO</auth-method>
</login-config>
  1. 按照Windows Authentication How-To中的说明设置所需的conf/krb5.iniconf/jaas.conf

  2. 添加一些安全约束。 这可以通过两种方式完成:

    • You can add <security-contraint> s in your web.xml file, which give users access based on a combination of HTTP method and URL pattern (see Securing Web Applications ),
    • 如果您需要更细粒度的控制,您可以将SecurityContext注入您的 JAX-RS 方法:请参阅Programmatic Security

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM