mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-17 22:39:53 +02: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:
committed by
Kristoffer Dalby
parent
00da5361b3
commit
1398d01bd8
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user