mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix: rename OTP to TOTP in v2 alpha user api
This change renames the v2 user OTP registration endpoints and objects to TOTP. Also the v2 related code paths have been renamed to TOTP. This change was discussed during the sprint review.
This commit is contained in:
@@ -271,9 +271,9 @@ service UserService {
|
||||
};
|
||||
}
|
||||
|
||||
rpc RegisterOTP (RegisterOTPRequest) returns (RegisterOTPResponse) {
|
||||
rpc RegisterTOTP (RegisterTOTPRequest) returns (RegisterTOTPResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2alpha/users/{user_id}/otp"
|
||||
post: "/v2alpha/users/{user_id}/totp"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
@@ -283,8 +283,8 @@ service UserService {
|
||||
}
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Start the registration of an OTP generator for a user";
|
||||
description: "Start the registration of a OTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device."
|
||||
summary: "Start the registration of a TOTP generator for a user";
|
||||
description: "Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device."
|
||||
responses: {
|
||||
key: "200"
|
||||
value: {
|
||||
@@ -294,9 +294,9 @@ service UserService {
|
||||
};
|
||||
}
|
||||
|
||||
rpc VerifyOTPRegistration (VerifyOTPRegistrationRequest) returns (VerifyOTPRegistrationResponse) {
|
||||
rpc VerifyTOTPRegistration (VerifyTOTPRegistrationRequest) returns (VerifyTOTPRegistrationResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2alpha/users/{user_id}/otp/_verify" // Why underscore here??
|
||||
post: "/v2alpha/users/{user_id}/totp/_verify"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
@@ -306,8 +306,8 @@ service UserService {
|
||||
}
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Verify a u2f token for a user";
|
||||
description: "Verify the OTP registration with a generated code."
|
||||
summary: "Verify a TOTP generator for a user";
|
||||
description: "Verify the TOTP registration with a generated code."
|
||||
responses: {
|
||||
key: "200"
|
||||
value: {
|
||||
@@ -719,7 +719,7 @@ message VerifyU2FRegistrationResponse{
|
||||
zitadel.object.v2alpha.Details details = 1;
|
||||
}
|
||||
|
||||
message RegisterOTPRequest {
|
||||
message RegisterTOTPRequest {
|
||||
string user_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
@@ -731,7 +731,7 @@ message RegisterOTPRequest {
|
||||
];
|
||||
}
|
||||
|
||||
message RegisterOTPResponse {
|
||||
message RegisterTOTPResponse {
|
||||
zitadel.object.v2alpha.Details details = 1;
|
||||
string uri = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
@@ -745,7 +745,7 @@ message RegisterOTPResponse {
|
||||
];
|
||||
}
|
||||
|
||||
message VerifyOTPRegistrationRequest {
|
||||
message VerifyTOTPRegistrationRequest {
|
||||
string user_id = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
@@ -759,13 +759,13 @@ message VerifyOTPRegistrationRequest {
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "Code generated by OTP app or device"
|
||||
description: "Code generated by TOTP app or device"
|
||||
example: "\"123456\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message VerifyOTPRegistrationResponse {
|
||||
message VerifyTOTPRegistrationResponse {
|
||||
zitadel.object.v2alpha.Details details = 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user