mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 19:57:22 +00:00
fix: rename (t)otp to code in session checks (#6455)
* fix: rename (t)otp to code in session checks * update integration tests --------- Co-authored-by: Fabi <fabienne@zitadel.com>
This commit is contained in:
parent
e17b49e4ca
commit
3c8640fbfd
@ -275,13 +275,13 @@ func (s *Server) checksToCommand(ctx context.Context, checks *session.Checks) ([
|
||||
sessionChecks = append(sessionChecks, s.command.CheckWebAuthN(passkey.GetCredentialAssertionData()))
|
||||
}
|
||||
if totp := checks.GetTotp(); totp != nil {
|
||||
sessionChecks = append(sessionChecks, command.CheckTOTP(totp.GetTotp()))
|
||||
sessionChecks = append(sessionChecks, command.CheckTOTP(totp.GetCode()))
|
||||
}
|
||||
if otp := checks.GetOtpSms(); otp != nil {
|
||||
sessionChecks = append(sessionChecks, command.CheckOTPSMS(otp.GetOtp()))
|
||||
sessionChecks = append(sessionChecks, command.CheckOTPSMS(otp.GetCode()))
|
||||
}
|
||||
if otp := checks.GetOtpEmail(); otp != nil {
|
||||
sessionChecks = append(sessionChecks, command.CheckOTPEmail(otp.GetOtp()))
|
||||
sessionChecks = append(sessionChecks, command.CheckOTPEmail(otp.GetCode()))
|
||||
}
|
||||
return sessionChecks, nil
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ func TestServer_SetSession_flow(t *testing.T) {
|
||||
SessionToken: sessionToken,
|
||||
Checks: &session.Checks{
|
||||
Totp: &session.CheckTOTP{
|
||||
Totp: code,
|
||||
Code: code,
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -533,7 +533,7 @@ func TestServer_SetSession_flow(t *testing.T) {
|
||||
SessionToken: sessionToken,
|
||||
Checks: &session.Checks{
|
||||
OtpSms: &session.CheckOTP{
|
||||
Otp: otp,
|
||||
Code: otp,
|
||||
},
|
||||
},
|
||||
})
|
||||
@ -564,7 +564,7 @@ func TestServer_SetSession_flow(t *testing.T) {
|
||||
SessionToken: sessionToken,
|
||||
Checks: &session.Checks{
|
||||
OtpEmail: &session.CheckOTP{
|
||||
Otp: otp,
|
||||
Code: otp,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -458,7 +458,7 @@ message CheckIDPIntent {
|
||||
}
|
||||
|
||||
message CheckTOTP {
|
||||
string totp = 1 [
|
||||
string code = 1 [
|
||||
(validate.rules).string = {min_len: 6, max_len: 6},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 6;
|
||||
@ -469,7 +469,7 @@ message CheckTOTP {
|
||||
}
|
||||
|
||||
message CheckOTP {
|
||||
string otp = 1 [
|
||||
string code = 1 [
|
||||
(validate.rules).string = {min_len: 1},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
min_length: 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user