Class PushCredentialsFile.Parsed
java.lang.Object
com.iizix.server.push.engine.http.PushCredentialsFile.Parsed
- Enclosing class:
PushCredentialsFile
The result of a parse: the valid entries and the diagnostics. The maps are keyed in English lower case and are unmodifiable.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionThe diagnostics, in file order, the whole-file ones last.final Map<String, Set<PushPrivilege>> The groups by lower-case name, each with the privileges it grants: a group whose line carried an unknown privilege is present and grants nothing.The members: lower-case user ID to the lower-case names of its groups, defined or not.The[server]members by their canonical name (VPubKey,VPrivKey,VSubject,fcmProject,fcmServiceAccountFile), present only with a non-empty value; a refused VAPID pair is absent.final Map<String, PushCredentialsFile.User> The users byPushCredentialsFile.User.key().final intThe number of users with a weak password type (section 3.4).Method Summary
Modifier and TypeMethodDescriptionbooleanTells whether any line was refused.privilegesOf(String userKey) Gets the privileges of a user: the union of what its defined groups grant.privilegesOfGroups(Iterable<String> groupNames) Gets the union of the privileges a set of groups grants under this file's definitions; a group the file does not define grants nothing (section 4).
Field Details
users
The users byPushCredentialsFile.User.key().groups
The groups by lower-case name, each with the privileges it grants: a group whose line carried an unknown privilege is present and grants nothing.members
server
diagnostics
The diagnostics, in file order, the whole-file ones last.weakCount
public final int weakCountThe number of users with a weak password type (section 3.4).
Method Details
hasSevere
public boolean hasSevere()Tells whether any line was refused.- Returns:
- true when a SEVERE diagnostic is present.
privilegesOf
Gets the privileges of a user: the union of what its defined groups grant.- Parameters:
userKey- The user ID in lower case.- Returns:
- The privileges, empty for a user in no defined group; never null.
privilegesOfGroups
Gets the union of the privileges a set of groups grants under this file's definitions; a group the file does not define grants nothing (section 4).- Parameters:
groupNames- The group names, in any case.- Returns:
- The privileges, never null.