idp.proto 695 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. syntax = "proto3";
  2. package memos.store;
  3. option go_package = "gen/store";
  4. message IdentityProvider {
  5. int32 id = 1;
  6. string name = 2;
  7. enum Type {
  8. TYPE_UNSPECIFIED = 0;
  9. OAUTH2 = 1;
  10. }
  11. Type type = 3;
  12. string identifier_filter = 4;
  13. IdentityProviderConfig config = 5;
  14. }
  15. message IdentityProviderConfig {
  16. oneof config {
  17. OAuth2Config oauth2_config = 1;
  18. }
  19. }
  20. message FieldMapping {
  21. string identifier = 1;
  22. string display_name = 2;
  23. string email = 3;
  24. }
  25. message OAuth2Config {
  26. string client_id = 1;
  27. string client_secret = 2;
  28. string auth_url = 3;
  29. string token_url = 4;
  30. string user_info_url = 5;
  31. repeated string scopes = 6;
  32. FieldMapping field_mapping = 7;
  33. }