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 Summary
Modifier and TypeMethodDescriptionbooleanregisterPushUser(String userID, String clearTextPassword, Set<String> groups) Registers a program user in memory.booleanunregisterPushUser(String userID) Removes a user registered withregisterPushUser(String, String, Set).
Method Details
registerPushUser
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:
trueif 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 isnull.
unregisterPushUser
Removes a user registered withregisterPushUser(String, String, Set). Users of the credentials file are not affected.- Parameters:
userID- The user ID.- Returns:
trueif a registered user was removed,falseif none was registered under that ID.