class TomlUser extends AbstractUser {

  @Override
  public JsonObject principal() {
    final JsonObject principle =
        new JsonObject()
            .put("username", username)
            .put("password", password)
            .put("groups", groups)
            .put("permissions", permissions)
            .put("roles", roles);
    privacyPublicKey.ifPresent(pk -> principle.put("privacyPublicKey", pk));
    return principle;
  }

    TomlUser(
      final String username,
      final String password,
      final List<String> groups,
      final List<String> permissions,
      final List<String> roles,
      final Optional<String> privacyPublicKey);

}