Spring Security 3.0- Customise basic http Authentication Dialog

Posted by gav on Stack Overflow See other posts from Stack Overflow or by gav
Published on 2010-05-03T15:57:29Z Indexed on 2010/05/03 16:18 UTC
Read the original article Hit count: 239

Filed under:
|
|

Rather than reading;

A user name and password are being requested by http://localhost:8080. The site says: "Spring Security Application"

I want to change the prompt, or at least change what the "site says". Does anyone know how to do this via resources.xml?

In my Grails App Spring configuration, my current version is as follows;

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
    <http auto-config="true" use-expressions="true">
        <http-basic/>
        <intercept-url pattern="/**" access="isAuthenticated()" />
    </http>

    <authentication-manager alias="authenticationManager">
        <authentication-provider>
            <user-service>
                <user name="admin" password="admin" authorities="ROLE_ADMIN"/>
            </user-service>
        </authentication-provider>
    </authentication-manager>
</beans:beans>

© Stack Overflow or respective owner

Related posts about spring

Related posts about security