-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Auth0 support service and Invites manager
- Loading branch information
1 parent
420f16b
commit 23b7b11
Showing
2 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
syntax = "proto3"; | ||
|
||
import "google/protobuf/struct.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
import "account.proto"; | ||
|
||
package auth0support; | ||
|
||
option go_package = "github.com/overmindtech/sdp-go;sdp"; | ||
|
||
// |`-._/\_.-`| | ||
// | || | | ||
// |___o()o___| | ||
// |__((<>))__| | ||
// \ o\/o / | ||
// \ || / | ||
// \ || / | ||
// jgs '.||.' | ||
// | ||
// Credit: https://www.asciiart.eu/ | ||
|
||
// The auth0 support service contains the endpoints used by Auth0 Actions to | ||
// post updates and receive additional information into Auth0. | ||
service Auth0Support { | ||
// create a new user on first login | ||
rpc CreateUser(Auth0CreateUserRequest) returns (Auth0CreateUserResponse); | ||
|
||
// Updates sources to keep them running in the background. This is called on | ||
// login by auth0 to give us a chance to boot up sources while the app is | ||
// loading. | ||
rpc KeepaliveSources(account.AdminKeepaliveSourcesRequest) returns (account.KeepaliveSourcesResponse); | ||
} | ||
|
||
message Auth0CreateUserRequest { | ||
string user_id = 1; | ||
string email = 2; | ||
} | ||
message Auth0CreateUserResponse { | ||
string org_id = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
syntax = "proto3"; | ||
|
||
import "google/protobuf/struct.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
package invites; | ||
|
||
option go_package = "github.com/overmindtech/sdp-go;sdp"; | ||
|
||
// _ | ||
// |E] | ||
// .-|=====-. | ||
// | | MAIL | | ||
// |________|___ | ||
// || | ||
// || | ||
// || www %%% | ||
// vwv || )_(,;;;, ,;,\_/ www | ||
// )_( || \|/ \_/ )_(\| (_) | ||
// \| \ || /\\|/ |/ \| \|// | | ||
// ___\|//jgs||//_\V/_\|//_______\\|//V/\\|/__ | ||
// | ||
// Credit: https://www.asciiart.eu/ | ||
|
||
// provides all operations for inviting people to an organization | ||
service InviteService { | ||
rpc CreateInvite(CreateInviteRequest) returns (CreateInviteResponse); | ||
rpc ListInvites(ListInvitesRequest) returns (ListInvitesResponse); | ||
rpc RevokeInvite(RevokeInviteRequest) returns (RevokeInviteResponse); | ||
} | ||
|
||
message CreateInviteRequest { | ||
repeated string emails = 1; | ||
} | ||
message CreateInviteResponse { | ||
} | ||
|
||
message Invite { | ||
string email = 1; | ||
|
||
enum InviteStatus { | ||
INVITE_STATUS_UNSPECIFIED = 0; | ||
// The user has been invited but has not yet accepted | ||
INVITE_STATUS_INVITED = 1; | ||
// The user has accepted the invitation | ||
INVITE_STATUS_ACCEPTED = 2; | ||
} | ||
InviteStatus status = 2; | ||
} | ||
|
||
message ListInvitesRequest { | ||
} | ||
message ListInvitesResponse { | ||
repeated Invite invites = 1; | ||
} | ||
|
||
message RevokeInviteRequest { | ||
string email = 1; | ||
} | ||
message RevokeInviteResponse { | ||
} |