开发者

Spring Security 3: intercept-url attribute "method" just works fine the first time

I am newbie in Spring Security 3, and I am having the next problem. Using the spring-security Namespace, I try开发者_如何学Python to configure a single basic authentication, in wich I want only to filter the POST method.

From my servlet.xml configuration:

<security:http  auto-config='true'>
    <security:http-basic></security:http-basic>
    <security:intercept-url method="POST" pattern="/**" access="ROLE_USER" />
</security:http>

Well, the thing is that, after starting the server, it works fine the first time (that is, the other methods doesn't prompt any authentication screen). But after a first use of the POST method, it prompt the authentication screen for all the method. Does anyone knows what am I missing?

Thanks in advance for your time! ;-)


Ok, auto-answer! xD I was using to try it a Firefox plugin called Rest Client (I really recommend it ;-) ). My failure was, after the first login tryial with the POST method, that it saved in cache that it has prompted an HTTP-BASIC authentication. After cleaning my history, it works fine.

After that, I have learned:

-Think always in the cache when you use a browser

-Give more information about your environment when you ask something in Stackoverflow xD

Thanks everyone!!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜