开发者

How to enable HTTP digest for embedded jetty / spring security?

I have two small http servers. One using the sun (com.sun.net.httpserver) server and one using an embedded jetty. Now I'm trying to get HTTP digest working on at least the jetty server (well, that was one of the reasons to use jetty instead of sun httpserver). Regardless of which server I utilize the basic setup is done via spring IOC container.

I don't like to use servlets for this purpose (well, using jetty I get HTTPServletRequest and HTTPServletResponse objects) and I'm new to spring security (I'm just using spring security because it seemed to be to most flexible approach regarding HTTP digest authentication). All I found about spring security was rather terse documented or completely servlet/filter oriented.

I like to know which is would be the easiest way to enable http digest for my servers. And if spring security is the answer how to wire the spring classes into my IOC container. I can imagine that dealing with http dig开发者_Python百科est needs some manual actions. That is fine for me as long as I have some starting hints.


Take a look at the Spring Security Documentation. You will have to configure DigestFilter and DigestFilterEntryPoint. Also, you will have to provide UserDetailsService. A good UserDetailsService implementation to start with would be In-Memory implementation.

Rest of the configuration should be pretty standard. You can find some "Getting Started" here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜