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
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
Provides logout functionality.
 The logout also manages any authenticated data storage and clears it when a user logs out.

 Parameters:
   scopes - a list of scopes to logout

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

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

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

 :api: public