app auth
This commit is contained in:
parent
e3c32a5650
commit
dc920d5e0c
8 changed files with 2273 additions and 2187 deletions
|
|
@ -96,12 +96,18 @@ service LightningPub {
|
|||
|
||||
// <App>
|
||||
|
||||
rpc AddApp(structs.AddAppRequest) returns (structs.AddAppResponse) {
|
||||
rpc AddApp(structs.AuthAppRequest) returns (structs.AuthApp) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/app/add";
|
||||
};
|
||||
|
||||
rpc AuthApp(structs.AuthAppRequest) returns (structs.AuthApp) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/app/auth";
|
||||
}
|
||||
|
||||
rpc GetApp(structs.Empty) returns (structs.Application) {
|
||||
option (auth_type) = "App";
|
||||
option (http_method) = "post";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ message LndGetInfoResponse {
|
|||
string alias = 1;
|
||||
}
|
||||
|
||||
message AddAppRequest {
|
||||
message AuthAppRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ message Application {
|
|||
string id = 2;
|
||||
int64 balance = 3;
|
||||
}
|
||||
message AddAppResponse {
|
||||
message AuthApp {
|
||||
Application app = 1;
|
||||
string auth_token = 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue