Skip to content

Commit

Permalink
add endpoint to list all the valid invite tokens generated by the user (
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 authored and dragonchaser committed Sep 1, 2023
1 parent ae6420d commit 4d62743
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,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

0 comments on commit 4d62743

Please sign in to comment.