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:
+15
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user