|
| 1 | +syntax = "proto3"; |
| 2 | + |
| 3 | +package gitpod.v1; |
| 4 | + |
| 5 | +import "gitpod/v1/pagination.proto"; |
| 6 | + |
| 7 | +option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1"; |
| 8 | + |
| 9 | +service AuthProviderService { |
| 10 | + // CreateAuthProvider creates a new auth provider. |
| 11 | + rpc CreateAuthProvider(CreateAuthProviderRequest) |
| 12 | + returns (CreateAuthProviderResponse) {} |
| 13 | + |
| 14 | + // GetAuthProvider returns a single auth provider. |
| 15 | + rpc GetAuthProvider(GetAuthProviderRequest) |
| 16 | + returns (GetAuthProviderResponse) {} |
| 17 | + |
| 18 | + // ListAuthProviders lists auth providers. |
| 19 | + rpc ListAuthProviders(ListAuthProvidersRequest) |
| 20 | + returns (ListAuthProvidersResponse) {} |
| 21 | + |
| 22 | + // ListAuthProviderDescriptions lists publicly available descriptions of |
| 23 | + // authproviders. |
| 24 | + rpc ListAuthProviderDescriptions(ListAuthProviderDescriptionsRequest) |
| 25 | + returns (ListAuthProviderDescriptionsResponse) {} |
| 26 | + |
| 27 | + // UpdateAuthProvider updates an auth provider. |
| 28 | + rpc UpdateAuthProvider(UpdateAuthProviderRequest) |
| 29 | + returns (UpdateAuthProviderResponse) {} |
| 30 | + |
| 31 | + // DeleteAuthProvider deletes the specified auth provider. |
| 32 | + rpc DeleteAuthProvider(DeleteAuthProviderRequest) |
| 33 | + returns (DeleteAuthProviderResponse) {} |
| 34 | +} |
| 35 | + |
| 36 | +message CreateAuthProviderRequest { |
| 37 | + oneof owner { |
| 38 | + string owner_id = 1; |
| 39 | + string organization_id = 2; |
| 40 | + } |
| 41 | + |
| 42 | + AuthProviderType type = 3; |
| 43 | + string host = 4; |
| 44 | + |
| 45 | + OAuth2Config oauth2_config = 5; |
| 46 | +} |
| 47 | + |
| 48 | +message CreateAuthProviderResponse { AuthProvider auth_provider = 1; } |
| 49 | + |
| 50 | +message GetAuthProviderRequest { string auth_provider_id = 1; } |
| 51 | + |
| 52 | +message GetAuthProviderResponse { AuthProvider auth_provider = 1; } |
| 53 | + |
| 54 | +message ListAuthProvidersRequest { |
| 55 | + PaginationRequest pagination = 1; |
| 56 | + oneof id { |
| 57 | + string user_id = 2; |
| 58 | + string organization_id = 3; |
| 59 | + } |
| 60 | +} |
| 61 | + |
| 62 | +message ListAuthProvidersResponse { |
| 63 | + repeated AuthProvider auth_providers = 1; |
| 64 | + PaginationResponse pagination = 2; |
| 65 | +} |
| 66 | + |
| 67 | +message ListAuthProviderDescriptionsRequest { |
| 68 | + PaginationRequest pagination = 1; |
| 69 | + oneof id { |
| 70 | + string user_id = 2; |
| 71 | + string organization_id = 3; |
| 72 | + } |
| 73 | +} |
| 74 | + |
| 75 | +message ListAuthProviderDescriptionsResponse { |
| 76 | + repeated AuthProviderDescription descriptions = 1; |
| 77 | + PaginationResponse pagination = 2; |
| 78 | +} |
| 79 | + |
| 80 | +message UpdateAuthProviderRequest { |
| 81 | + string auth_provider_id = 1; |
| 82 | + |
| 83 | + OAuth2Config oauth2_config = 2; |
| 84 | +} |
| 85 | + |
| 86 | +message UpdateAuthProviderResponse {} |
| 87 | + |
| 88 | +message DeleteAuthProviderRequest { string auth_provider_id = 1; } |
| 89 | + |
| 90 | +message DeleteAuthProviderResponse {} |
| 91 | + |
| 92 | +message AuthProviderDescription { |
| 93 | + string id = 1; |
| 94 | + |
| 95 | + AuthProviderType type = 4; |
| 96 | + string host = 5; |
| 97 | + |
| 98 | + optional string icon = 6; |
| 99 | + optional string description = 7; |
| 100 | +} |
| 101 | + |
| 102 | +message AuthProvider { |
| 103 | + string id = 1; |
| 104 | + |
| 105 | + oneof owner { |
| 106 | + string owner_id = 2; |
| 107 | + string organization_id = 3; |
| 108 | + } |
| 109 | + |
| 110 | + AuthProviderType type = 4; |
| 111 | + string host = 5; |
| 112 | + |
| 113 | + optional string icon = 6; |
| 114 | + optional string description = 7; |
| 115 | + optional string settings_url = 8; |
| 116 | + |
| 117 | + bool verified = 9; |
| 118 | + bool enable_login = 10; |
| 119 | + |
| 120 | + repeated string scopes = 11; |
| 121 | + |
| 122 | + OAuth2Config oauth2_config = 12; |
| 123 | +} |
| 124 | + |
| 125 | +message OAuth2Config { |
| 126 | + string client_id = 1; |
| 127 | + string client_secret = 2; |
| 128 | +} |
| 129 | + |
| 130 | +enum AuthProviderType { |
| 131 | + // This value is not allowed. |
| 132 | + AUTH_PROVIDER_TYPE_UNSPECIFIED = 0; |
| 133 | + AUTH_PROVIDER_TYPE_GITHUB = 1; |
| 134 | + AUTH_PROVIDER_TYPE_GITLAB = 2; |
| 135 | + AUTH_PROVIDER_TYPE_BITBUCKET = 3; |
| 136 | + AUTH_PROVIDER_TYPE_BITBUCKET_SERVER = 4; |
| 137 | +} |
0 commit comments