manage authorization
This commit is contained in:
parent
819cf74d2f
commit
df088bf0fe
18 changed files with 623 additions and 56 deletions
|
|
@ -592,12 +592,24 @@ service LightningPub {
|
|||
option (http_route) = "/api/user/debit/get";
|
||||
option (nostr) = true;
|
||||
}
|
||||
rpc GetManageAuthorizations(structs.Empty) returns (structs.ManageAuthorizations){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "get";
|
||||
option (http_route) = "/api/user/manage/get";
|
||||
option (nostr) = true;
|
||||
}
|
||||
rpc AuthorizeDebit(structs.DebitAuthorizationRequest) returns (structs.DebitAuthorization){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/user/debit/authorize";
|
||||
option (nostr) = true;
|
||||
}
|
||||
rpc AuthorizeManage(structs.ManageAuthorizationRequest) returns (structs.ManageAuthorization){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/user/manage/authorize";
|
||||
option (nostr) = true;
|
||||
}
|
||||
rpc EditDebit(structs.DebitAuthorizationRequest) returns (structs.Empty){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
|
|
@ -628,6 +640,14 @@ service LightningPub {
|
|||
option (http_route) = "/api/user/debit/sub";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc GetLiveManageRequests(structs.Empty) returns (stream structs.LiveManageRequest){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/user/manage/sub";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc GetLiveUserOperations(structs.Empty) returns (stream structs.LiveUserOperation){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
|
|
|
|||
|
|
@ -674,6 +674,22 @@ message DebitAuthorizationRequest {
|
|||
optional string request_id = 3;
|
||||
}
|
||||
|
||||
message ManageAuthorizationRequest {
|
||||
string authorize_npub = 1;
|
||||
optional string request_id = 2;
|
||||
bool ban = 3;
|
||||
}
|
||||
|
||||
message ManageAuthorization {
|
||||
string manage_id = 1;
|
||||
bool authorized = 2;
|
||||
string npub = 3;
|
||||
}
|
||||
|
||||
message ManageAuthorizations {
|
||||
repeated ManageAuthorization manages = 1;
|
||||
}
|
||||
|
||||
message DebitAuthorization {
|
||||
string debit_id = 1;
|
||||
bool authorized = 2;
|
||||
|
|
@ -718,6 +734,11 @@ message LiveDebitRequest {
|
|||
}
|
||||
}
|
||||
|
||||
message LiveManageRequest {
|
||||
string request_id = 1;
|
||||
string npub = 2;
|
||||
}
|
||||
|
||||
message DebitResponse {
|
||||
string request_id = 1;
|
||||
string npub = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue