mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-03 20:21:40 +00:00
chore: add idp workspace setting
This commit is contained in:
37
proto/store/idp.proto
Normal file
37
proto/store/idp.proto
Normal file
@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package slash.store;
|
||||
|
||||
option go_package = "gen/store";
|
||||
|
||||
message IdentityProvider {
|
||||
string name = 1;
|
||||
|
||||
enum Type {
|
||||
TYPE_UNSPECIFIED = 0;
|
||||
OAUTH2 = 1;
|
||||
}
|
||||
Type type = 2;
|
||||
IdentityProviderConfig config = 3;
|
||||
}
|
||||
|
||||
message IdentityProviderConfig {
|
||||
oneof config {
|
||||
OAuth2Config oauth2_config = 1;
|
||||
}
|
||||
|
||||
message FieldMapping {
|
||||
string email = 1;
|
||||
string display_name = 2;
|
||||
}
|
||||
|
||||
message OAuth2Config {
|
||||
string client_id = 1;
|
||||
string client_secret = 2;
|
||||
string auth_url = 3;
|
||||
string token_url = 4;
|
||||
string user_info_url = 5;
|
||||
repeated string scopes = 6;
|
||||
FieldMapping field_mapping = 7;
|
||||
}
|
||||
}
|
@ -3,16 +3,18 @@ syntax = "proto3";
|
||||
package slash.store;
|
||||
|
||||
import "store/common.proto";
|
||||
import "store/idp.proto";
|
||||
|
||||
option go_package = "gen/store";
|
||||
|
||||
message WorkspaceSetting {
|
||||
WorkspaceSettingKey key = 1;
|
||||
string raw = 4;
|
||||
string raw = 2;
|
||||
|
||||
oneof value {
|
||||
GeneralSetting general = 2;
|
||||
ShortcutRelatedSetting shortcut_related = 3;
|
||||
GeneralSetting general = 3;
|
||||
ShortcutRelatedSetting shortcut_related = 4;
|
||||
IdentityProviderSetting identity_provider = 5;
|
||||
}
|
||||
|
||||
message GeneralSetting {
|
||||
@ -25,6 +27,10 @@ message WorkspaceSetting {
|
||||
message ShortcutRelatedSetting {
|
||||
Visibility default_visibility = 1;
|
||||
}
|
||||
|
||||
message IdentityProviderSetting {
|
||||
repeated IdentityProvider identity_providers = 1;
|
||||
}
|
||||
}
|
||||
|
||||
enum WorkspaceSettingKey {
|
||||
@ -33,14 +39,16 @@ enum WorkspaceSettingKey {
|
||||
WORKSPACE_SETTING_GENERAL = 1;
|
||||
// Workspace shortcut-related settings.
|
||||
WORKSPACE_SETTING_SHORTCUT_RELATED = 2;
|
||||
// Workspace identity provider settings.
|
||||
WORKSPACE_SETTING_IDENTITY_PROVIDER = 3;
|
||||
|
||||
// TODO: remove the following keys.
|
||||
// The license key.
|
||||
WORKSPACE_SETTING_LICENSE_KEY = 3;
|
||||
WORKSPACE_SETTING_LICENSE_KEY = 10;
|
||||
// The secret session key used to encrypt session data.
|
||||
WORKSPACE_SETTING_SECRET_SESSION = 4;
|
||||
WORKSPACE_SETTING_SECRET_SESSION = 11;
|
||||
// The custom style.
|
||||
WORKSPACE_SETTING_CUSTOM_STYLE = 5;
|
||||
WORKSPACE_SETTING_CUSTOM_STYLE = 12;
|
||||
// The default visibility of shortcuts and collections.
|
||||
WORKSPACE_SETTING_DEFAULT_VISIBILITY = 6;
|
||||
WORKSPACE_SETTING_DEFAULT_VISIBILITY = 13;
|
||||
}
|
||||
|
Reference in New Issue
Block a user