mirror of
https://github.com/juanfont/headscale.git
synced 2026-01-23 02:24:10 +00:00
proto: change preauthkey API to ID-based operations
Remove user parameter from ListPreAuthKeys. Change ExpirePreAuthKey and DeletePreAuthKey to use key ID.
This commit is contained in:
parent
00da5361b3
commit
1398d01bd8
2 changed files with 36 additions and 8 deletions
|
|
@ -1,10 +1,11 @@
|
|||
syntax = "proto3";
|
||||
package headscale.v1;
|
||||
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "headscale/v1/user.proto";
|
||||
|
||||
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
||||
|
||||
message PreAuthKey {
|
||||
User user = 1;
|
||||
uint64 id = 2;
|
||||
|
|
@ -25,22 +26,24 @@ message CreatePreAuthKeyRequest {
|
|||
repeated string acl_tags = 5;
|
||||
}
|
||||
|
||||
message CreatePreAuthKeyResponse { PreAuthKey pre_auth_key = 1; }
|
||||
message CreatePreAuthKeyResponse {
|
||||
PreAuthKey pre_auth_key = 1;
|
||||
}
|
||||
|
||||
message ExpirePreAuthKeyRequest {
|
||||
uint64 user = 1;
|
||||
string key = 2;
|
||||
uint64 id = 1;
|
||||
}
|
||||
|
||||
message ExpirePreAuthKeyResponse {}
|
||||
|
||||
message DeletePreAuthKeyRequest {
|
||||
uint64 user = 1;
|
||||
string key = 2;
|
||||
uint64 id = 1;
|
||||
}
|
||||
|
||||
message DeletePreAuthKeyResponse {}
|
||||
|
||||
message ListPreAuthKeysRequest { uint64 user = 1; }
|
||||
message ListPreAuthKeysRequest {}
|
||||
|
||||
message ListPreAuthKeysResponse { repeated PreAuthKey pre_auth_keys = 1; }
|
||||
message ListPreAuthKeysResponse {
|
||||
repeated PreAuthKey pre_auth_keys = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue