How can I write my own logout page?

And is this set somewhere in your web vhost configuration or only in the Nextcloud “SSO&SAML” Settings?

I use this CAS config:

    CASVersion 2
    CASLoginURL https://cas.domain.com/cas/login
    CASValidateURL https://cas.domain.com/cas/serviceValidate
    CASDebug On

    <Location "/nextcloud/index.php/login">
            AuthType CAS
            AuthName "CAS"
            Require valid-user
            CASAuthNHeader HTTP_CAS_USER
    </Location>


    <Location "/nextcloud/index.php/apps/user_saml/saml/login">
            AuthType CAS
            AuthName "CAS"
            Require valid-user
            CASAuthNHeader HTTP_CAS_USER
    </Location>