fix: rename lifetime to expiration of pwless link in ImportHumanUserResponse (#2687)

This commit is contained in:
Livio Amstutz 2021-11-15 14:24:45 +01:00 committed by GitHub
parent 8d4b2dcc75
commit ebe2fbe1d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -5081,7 +5081,8 @@ This is an empty response
| Field | Type | Description | Validation | | Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- | | ----- | ---- | ----------- | ----------- |
| link | string | - | | | link | string | - | |
| lifetime | google.protobuf.Duration | - | | | lifetime | google.protobuf.Duration | deprecated: use expiration instead | |
| expiration | google.protobuf.Duration | - | |

View File

@ -184,8 +184,9 @@ func (s *Server) ImportHumanUser(ctx context.Context, req *mgmt_pb.ImportHumanUs
} }
if code != nil { if code != nil {
resp.PasswordlessRegistration = &mgmt_pb.ImportHumanUserResponse_PasswordlessRegistration{ resp.PasswordlessRegistration = &mgmt_pb.ImportHumanUserResponse_PasswordlessRegistration{
Link: code.Link(s.systemDefaults.Notifications.Endpoints.PasswordlessRegistration), Link: code.Link(s.systemDefaults.Notifications.Endpoints.PasswordlessRegistration),
Lifetime: durationpb.New(code.Expiration), Lifetime: durationpb.New(code.Expiration),
Expiration: durationpb.New(code.Expiration),
} }
} }
return resp, nil return resp, nil

View File

@ -580,7 +580,6 @@ service ManagementService {
rpc AddPasswordlessRegistration(AddPasswordlessRegistrationRequest) returns (AddPasswordlessRegistrationResponse) { rpc AddPasswordlessRegistration(AddPasswordlessRegistrationRequest) returns (AddPasswordlessRegistrationResponse) {
option (google.api.http) = { option (google.api.http) = {
post: "/users/{user_id}/passwordless/_link" post: "/users/{user_id}/passwordless/_link"
body: "*"
}; };
option (zitadel.v1.auth_option) = { option (zitadel.v1.auth_option) = {
permission: "user.credential.write" permission: "user.credential.write"
@ -3001,7 +3000,9 @@ message ImportHumanUserRequest {
message ImportHumanUserResponse { message ImportHumanUserResponse {
message PasswordlessRegistration { message PasswordlessRegistration {
string link = 1; string link = 1;
//deprecated: use expiration instead
google.protobuf.Duration lifetime = 2; google.protobuf.Duration lifetime = 2;
google.protobuf.Duration expiration = 3;
} }
string user_id = 1; string user_id = 1;