Spring Security HTTP Basic Authentication

Posted by Raspayu on Stack Overflow See other posts from Stack Overflow or by Raspayu
Published on 2010-04-22T13:25:26Z Indexed on 2010/04/23 8:33 UTC
Read the original article Hit count: 619

Hi people!

I am trying to do a really simple basic authentication with Spring Security. I have configured properly the namespace, and there are no Exceptions in the server. In my "servlet.xml" I have got the next for Spring Security:

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


<security:authentication-manager  alias="authenticationManager">
    <security:authentication-provider>
        <security:user-service>
            <security:user name="cucu" password="tas" authorities="ROLE_USER" />
            <security:user name="bob" password="bobspassword" authorities="ROLE_USER" />
        </security:user-service>
    </security:authentication-provider>
</security:authentication-manager>

It nearly all goes perfect: the methods that are not POST doesn't prompt any login form, and the POST method prompt it. The problem is, that nor "cucu", neither "bob" can login there. Can anyone see what am I doing wrong?

Thanks in advance! ;-)

© Stack Overflow or respective owner

Related posts about spring-security

Related posts about http-basic-authentication