class Warden::Proxy

def logout(*scopes)

:api: public

env['warden'].logout(:publisher, :admin)
# Logout the :publisher and :admin user

env['warden'].logout(:default)
# Logout the default user but leave the rest of the session alone

env['warden'].logout
# Logout everyone and clear the session
Example:

scopes - a list of scopes to logout
Parameters:

The logout also manages any authenticated data storage and clears it when a user logs out.
Provides logout functionality.
def logout(*scopes)
  if scopes.empty?
    scopes = @users.keys
    reset_session = true
  end
  scopes.each do |scope|
    user = @users.delete(scope)
    manager._run_callbacks(:before_logout, user, self, :scope => scope)
    raw_session.delete("warden.user.#{scope}.session") unless raw_session.nil?
    session_serializer.delete(scope, user)
  end
  reset_session! if reset_session
end