Class PushCredentialsFile.Parsed

java.lang.Object
com.iizix.server.push.engine.http.PushCredentialsFile.Parsed
Enclosing class:
PushCredentialsFile

public static final class PushCredentialsFile.Parsed extends Object
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 Details

    • users

    • groups

      public final Map<String, Set<PushPrivilege>> 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

      public final Map<String, Set<String>> members
      The members: lower-case user ID to the lower-case names of its groups, defined or not.
    • server

      public final Map<String,String> server
      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.
    • diagnostics

      public final List<PushCredentialsFile.Diagnostic> diagnostics
      The diagnostics, in file order, the whole-file ones last.
    • weakCount

      public final int weakCount
      The 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

      public Set<PushPrivilege> privilegesOf(String userKey)
      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

      public Set<PushPrivilege> 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).
      Parameters:
      groupNames - The group names, in any case.
      Returns:
      The privileges, never null.