Class RoleValidator.RoleConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • addRoles

        public RoleValidator.RoleConfig.Builder addRoles​(Collection<String> rolesAllowed)
        Add a collection of roles for user subject to this builder.
        Parameters:
        rolesAllowed - collection of roles, iterator order will be preserved for checking the roles
        Returns:
        updated builder instance
      • clearServiceRoles

        public RoleValidator.RoleConfig.Builder clearServiceRoles()
        Clears all service roles currently set to this builder.
        Returns:
        updated builder instance
      • addRole

        public RoleValidator.RoleConfig.Builder addRole​(String role)
        Add a role to the list of roles for a user subject. Role will be added only once (e.g. this builder is using a linked hash set to store the roles).
        Parameters:
        role - a role, order of calls to this method will be preserved
        Returns:
        updated builder instance
      • addServiceRoles

        public RoleValidator.RoleConfig.Builder addServiceRoles​(Collection<String> rolesAllowed)
        Add a collection of roles for service subject to this builder.
        Parameters:
        rolesAllowed - collection of roles, iterator order will be preserved for checking the roles
        Returns:
        updated builder instance
      • config

        public RoleValidator.RoleConfig.Builder config​(Config config)
        Load configuration data from configuration.
        Parameters:
        config - configuration located the key of this attribute config
        Returns:
        updated builder instance