Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List valid invite tokens #201

Merged
merged 1 commit into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ service GatewayAPI {

// Generates a new token for the user with a validity of 24 hours.
rpc GenerateInviteToken(cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest) returns (cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse);
// Lists the valid tokens generated by the user.
rpc ListInviteTokens(cs3.ocm.invite.v1beta1.ListInviteTokensRequest) returns (cs3.ocm.invite.v1beta1.ListInviteTokensResponse);
// Forwards a received invite to the sync'n'share system provider.
rpc ForwardInvite(cs3.ocm.invite.v1beta1.ForwardInviteRequest) returns (cs3.ocm.invite.v1beta1.ForwardInviteResponse);
// Completes an invitation acceptance.
Expand Down
13 changes: 13 additions & 0 deletions cs3/ocm/invite/v1beta1/invite_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ import "cs3/types/v1beta1/types.proto";
service InviteAPI {
// Generates a new token for the user with a validity of 24 hours.
rpc GenerateInviteToken(GenerateInviteTokenRequest) returns (GenerateInviteTokenResponse);
// Lists the valid tokens generated by the user.
rpc ListInviteTokens(ListInviteTokensRequest) returns (ListInviteTokensResponse);
// Forwards a received invite to the sync'n'share system provider.
// MUST return CODE_NOT_FOUND if the token does not exist.
// MUST return CODE_INVALID_ARGUMENT if the token expired.
Expand Down Expand Up @@ -92,6 +94,17 @@ message GenerateInviteTokenResponse {
InviteToken invite_token = 3;
}

message ListInviteTokensRequest {}

message ListInviteTokensResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// REQUIRED.
// The list of valid tokens.
repeated InviteToken invite_tokens = 2;
}

message ForwardInviteRequest {
// OPTIONAL.
// Opaque information.
Expand Down