Spring Security 3.0. Set up a basic http authentication dialog.

Instead of reading;

The username and password are requested by http: // localhost: 8080 . The site says: "Spring Security Application"

I want to change the invitation, or at least change what the site says. Does anyone know how to do this through 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> 
+6
spring-security grails
source share
1 answer

You cannot change it. Your application sends only part of the "Spring Secuirty Application" to the browser. Other parts of the invitation are added by the browser.

To change part of the Spring Security Application ", you can use the realm attribute of the <http> element:

 <http realm = "My Application" ... > 
+9
source

All Articles