1
0
mirror of synced 2026-08-05 17:57:15 +00:00

SEC-1717: Document how to perform Single Logout with CAS and added integration test for sample application to test Single Logout

This commit is contained in:
Rob Winch
2011-04-16 20:17:01 -05:00
parent 04f1df2a1b
commit 11331d34d9
2 changed files with 92 additions and 0 deletions
@@ -21,6 +21,7 @@ import org.junit.runner.RunWith;
import org.spockframework.runtime.Sputnik;
import org.springframework.security.samples.cas.pages.*
import spock.lang.Shared;
import spock.lang.Stepwise;
/**
@@ -30,6 +31,7 @@ import spock.lang.Stepwise;
*/
@Stepwise
class CasSampleSpec extends BaseSpec {
@Shared String casServerLogoutUrl = LoginPage.url.replaceFirst('/login','/logout')
def 'access home page with unauthenticated user succeeds'() {
when: 'Unauthenticated user accesses the Home Page'
@@ -108,4 +110,17 @@ class CasSampleSpec extends BaseSpec {
then: 'login page is displayed'
at LoginPage
}
def 'loging out of the cas server successfully logs out of the cas servers'() {
setup: 'login with ROLE_USER'
to SecurePage
at LoginPage
login 'rod'
at SecurePage
when: 'logout of the CAS Server'
go casServerLogoutUrl
to SecurePage
then: 'user is logged out of the CAS Service'
at LoginPage
}
}