簡體   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