Interface IPushUserRegistry

All Known Implementing Classes:
PushCredentials

public interface IPushUserRegistry
The Java registration of Push Notification HTTP API users (ruling R6): program users held in memory beside the users of the credentials file (PUSH-CREDENTIALS section 7).

A registered user is a program user, like a file user: it has no database row, so it reaches only the external operations of the HTTP API (push, count, list and keys), with the privileges of the groups it is registered in. Server code obtains the registry from the engine, IPushNotificationEngine.getPushUserRegistry() (CC-PUSH-SERVER-INI decision 5, 2026-09-26); the engine's credentials implement it.

Author:
Christopher Mindus
  • Method Details

    • registerPushUser

      boolean registerPushUser(String userID, String clearTextPassword, Set<String> groups)
      Registers a program user in memory. The entry is never written anywhere and is gone at shutdown. The password is hashed at once and the clear text is not kept; the caller should clear its own copy.
      Parameters:
      userID - The user ID: at least one character, no whitespace, no colon.
      clearTextPassword - The password the program will send with Basic authentication.
      groups - The groups whose privileges the user gets, as defined in the credentials file or, without one, by the built-in definitions.
      Returns:
      true if registered; false, with a WARNING naming the user ID, if the user ID is invalid, is already in the credentials file or is already registered - the credentials file always wins.
      Throws:
      NullPointerException - If any argument is null.
    • unregisterPushUser

      boolean unregisterPushUser(String userID)
      Removes a user registered with registerPushUser(String, String, Set). Users of the credentials file are not affected.
      Parameters:
      userID - The user ID.
      Returns:
      true if a registered user was removed, false if none was registered under that ID.