server.proto 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. syntax = "proto3";
  2. package chatto.api.v1;
  3. import "chatto/api/v1/common.proto";
  4. // Public server profile, identity, and branding fields.
  5. message ServerPublicProfile {
  6. // Display name of the Chatto server.
  7. string name = 1;
  8. // Server software version.
  9. string version = 2;
  10. // Optional server logo URL.
  11. optional string logo_url = 3;
  12. // Optional server banner URL.
  13. optional string banner_url = 4;
  14. // Optional welcome message.
  15. optional string welcome_message = 5;
  16. // Optional server description.
  17. optional string description = 6;
  18. }
  19. // Policy controlling whether self-service account creation requires an invitation.
  20. enum AccountCreationPolicy {
  21. // Compatibility value used by older servers. Clients treat it as open.
  22. ACCOUNT_CREATION_POLICY_UNSPECIFIED = 0;
  23. // Self-service account creation does not require an invitation.
  24. ACCOUNT_CREATION_POLICY_OPEN = 1;
  25. // Every self-service account creation path requires a valid invitation.
  26. ACCOUNT_CREATION_POLICY_INVITE_ONLY = 2;
  27. }
  28. // Login and registration options exposed before authentication.
  29. message ServerLogin {
  30. // Whether users can create accounts through the public UI.
  31. bool direct_registration_enabled = 1;
  32. // Configured login providers.
  33. repeated ProviderMetadata providers = 2;
  34. // URL for the legacy authorization flow, when enabled.
  35. string authorize_url = 3;
  36. // Admission policy for direct registration and provider auto-provisioning.
  37. AccountCreationPolicy account_creation_policy = 4;
  38. // Whether users can sign in directly with a username or email address and password.
  39. // Absent on older servers, where clients should treat direct login as enabled.
  40. optional bool direct_login_enabled = 5;
  41. }