Grails 프로젝트에 spring-security-plugin을 추가하기 만하면됩니다. 모든 것이 잘 작동하는 것처럼 보입니다. 하지만 로그 아웃하려고 할 때 응용 프로그램이 로그 아웃 메시지를 보여 주지만 응용 프로그램은 여전히 로그인되어 있습니다!Grails Spring Security 플러그인 : 로그 아웃이 작동하지 않습니다.
내 구성 파일은 다음과 같습니다. 브라우저가 자격 증명을 캐싱하고 다시 당신을 로깅해야
Grails 프로젝트에 spring-security-plugin을 추가하기 만하면됩니다. 모든 것이 잘 작동하는 것처럼 보입니다. 하지만 로그 아웃하려고 할 때 응용 프로그램이 로그 아웃 메시지를 보여 주지만 응용 프로그램은 여전히 로그인되어 있습니다!Grails Spring Security 플러그인 : 로그 아웃이 작동하지 않습니다.
내 구성 파일은 다음과 같습니다. 브라우저가 자격 증명을 캐싱하고 다시 당신을 로깅해야
것은 당신이 기본 인증을 사용하고 있기 때문에
// Added by the Spring Security Core plugin:
grails.plugins.springsecurity.useBasicAuth = true
grails.plugins.springsecurity.userLookup.userDomainClassName = 'malibu.server.User'
grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'malibu.server.UserRole'
grails.plugins.springsecurity.authority.className = 'malibu.server.Role'
환호를
그냥 세션 리디렉션 전에 .invalidate().
class LogoutController {
/**
* Index action. Redirects to the Spring security logout uri.
*/
def index = {
session.invalidate()
redirect [whatever]
}
}
그래 맞을 수도 있습니다! 그래서 요점은 '/ j_spring_security_logout'은 그것을 지워야하지 않습니까? –
로그 아웃 작업은 인증을 제거하고 http 세션을 무효화하지만 캐시 된 기본 인증 정보로 브라우저가 수행하는 작업을 제어 할 수 없습니다. http://stackoverflow.com/questions/233507/how-to-log-out-user-from-web-site-using-basic-authentication 및 http://userfirstweb.com/23/logouts-form-based를 참조하십시오. -http-basic-authentication / –