Likewise implementing a logout script (ESP, too) is equally simple:
if (request.authType) { // not logged in at all, no need to logout } else { var auth = sling.getService(org.apache.sling.commons.auth.Authenticator); if (auth != null) { auth.logout(request, response); } else { // handle the case of no Authenticator service to logout with } }
This interface is not intended to be implemented by applications but may be used to initiate the authentication process form a request processing servlet or script. @since 1.0 (Sling API Bundle 2.1.0)
|
|
|
|