public void onLogout(PrincipalCollection principals) {
        super.onLogout(principals);
        Collection<Realm> realms = getRealms();
        if (!CollectionUtils.isEmpty(realms)) {
            for (Realm realm : realms) {
                if (realm instanceof LogoutAware) {
                    ((LogoutAware) realm).onLogout(principals);
                }
            }
        }
    }
First calls <code>super.onLogout(principals)</code> to ensure a logout notification is issued, and for each
wrapped {@code Realm} that implements the {@link LogoutAware LogoutAware} interface, calls
<code>((LogoutAware)realm).onLogout(principals)</code> to allow each realm the opportunity to perform
logout/cleanup operations during an user-logout.
<p/>
Shiro's Realm implementations all implement the {@code LogoutAware} interface by default and can be
overridden for realm-specific logout logic.

@param principals the application-specific Subject/user identifier.
core/src/main/java/org/apache/shiro/authc/pam/ModularRealmAuthenticator.java