From 3a4d1876c872bf4ca6c009313b141e02a4194985 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Mon, 10 Mar 2025 08:40:47 +0100 Subject: [PATCH] Set uint64 and string for period and counter --- App/Protobuf/GPBMetadata/GoogleAuth.php | Bin 1507 -> 1431 bytes .../GoogleAuth/Payload/OtpParameters.php | 30 +++++++++--------- app/Protobuf/GPBMetadata/GoogleAuth.php | Bin 1507 -> 1431 bytes app/Protobuf/GoogleAuth.proto | 5 ++- .../GoogleAuth/Payload/OtpParameters.php | 30 +++++++++--------- 5 files changed, 32 insertions(+), 33 deletions(-) diff --git a/App/Protobuf/GPBMetadata/GoogleAuth.php b/App/Protobuf/GPBMetadata/GoogleAuth.php index 48120d6ddc306f55101ac204fb71dd66d516ef81..51af3b21fb2237eda78d53f558b2bbf6a5efc30a 100644 GIT binary patch delta 59 zcmV-B0L1^}3zrM9ivg3t0WSfRlkov90l||W0;vM}1hdKlD*+Y+NC1cd0TL4m25@C^ RX>Vj02p|C{39}&t!U0Js5fcCa delta 127 zcmbQv{g``0H=}Nhdw`Q~YDr>BVo73*dwza;PHId*QGQ8&QfXR@V_v0|Rc2mhiGN;l zs)nZZCDR1f%~P1P8Fg4a7&;gkg*3U?3Q~(Q^HU@^6c{zQ XjYRa)!6xbzKuy#Gnz;EY^C3n6`lBjq diff --git a/App/Protobuf/GoogleAuth/Payload/OtpParameters.php b/App/Protobuf/GoogleAuth/Payload/OtpParameters.php index c111c123..2cc3f8a8 100644 --- a/App/Protobuf/GoogleAuth/Payload/OtpParameters.php +++ b/App/Protobuf/GoogleAuth/Payload/OtpParameters.php @@ -38,11 +38,11 @@ class OtpParameters extends \Google\Protobuf\Internal\Message */ protected $type = 0; /** - * Generated from protobuf field optional int32 counter = 7; + * Generated from protobuf field optional uint64 counter = 7; */ protected $counter = null; /** - * Generated from protobuf field optional .google.protobuf.Any period = 8; + * Generated from protobuf field optional string period = 8; */ protected $period = null; @@ -58,8 +58,8 @@ class OtpParameters extends \Google\Protobuf\Internal\Message * @type int $algorithm * @type int $digits * @type int $type - * @type int $counter - * @type \Google\Protobuf\Any $period + * @type int|string $counter + * @type string $period * } */ public function __construct($data = NULL) { @@ -200,8 +200,8 @@ public function setType($var) } /** - * Generated from protobuf field optional int32 counter = 7; - * @return int + * Generated from protobuf field optional uint64 counter = 7; + * @return int|string */ public function getCounter() { @@ -219,25 +219,25 @@ public function clearCounter() } /** - * Generated from protobuf field optional int32 counter = 7; - * @param int $var + * Generated from protobuf field optional uint64 counter = 7; + * @param int|string $var * @return $this */ public function setCounter($var) { - GPBUtil::checkInt32($var); + GPBUtil::checkUint64($var); $this->counter = $var; return $this; } /** - * Generated from protobuf field optional .google.protobuf.Any period = 8; - * @return \Google\Protobuf\Any|null + * Generated from protobuf field optional string period = 8; + * @return string */ public function getPeriod() { - return $this->period; + return isset($this->period) ? $this->period : ''; } public function hasPeriod() @@ -251,13 +251,13 @@ public function clearPeriod() } /** - * Generated from protobuf field optional .google.protobuf.Any period = 8; - * @param \Google\Protobuf\Any $var + * Generated from protobuf field optional string period = 8; + * @param string $var * @return $this */ public function setPeriod($var) { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + GPBUtil::checkString($var, True); $this->period = $var; return $this; diff --git a/app/Protobuf/GPBMetadata/GoogleAuth.php b/app/Protobuf/GPBMetadata/GoogleAuth.php index 48120d6ddc306f55101ac204fb71dd66d516ef81..51af3b21fb2237eda78d53f558b2bbf6a5efc30a 100644 GIT binary patch delta 59 zcmV-B0L1^}3zrM9ivg3t0WSfRlkov90l||W0;vM}1hdKlD*+Y+NC1cd0TL4m25@C^ RX>Vj02p|C{39}&t!U0Js5fcCa delta 127 zcmbQv{g``0H=}Nhdw`Q~YDr>BVo73*dwza;PHId*QGQ8&QfXR@V_v0|Rc2mhiGN;l zs)nZZCDR1f%~P1P8Fg4a7&;gkg*3U?3Q~(Q^HU@^6c{zQ XjYRa)!6xbzKuy#Gnz;EY^C3n6`lBjq diff --git a/app/Protobuf/GoogleAuth.proto b/app/Protobuf/GoogleAuth.proto index 952fd3c8..d338060c 100644 --- a/app/Protobuf/GoogleAuth.proto +++ b/app/Protobuf/GoogleAuth.proto @@ -1,6 +1,5 @@ syntax = "proto3"; -import "google/protobuf/any.proto"; package app.Protobuf.GoogleAuth; option php_metadata_namespace = "App\\Protobuf\\GPBMetadata"; @@ -30,8 +29,8 @@ message Payload { Algorithm algorithm = 4; DigitCount digits = 5; OtpType type = 6; - optional int32 counter = 7; - optional google.protobuf.Any period = 8; + optional uint64 counter = 7; + optional string period = 8; } repeated OtpParameters otp_parameters = 1; int32 version = 2; diff --git a/app/Protobuf/GoogleAuth/Payload/OtpParameters.php b/app/Protobuf/GoogleAuth/Payload/OtpParameters.php index c111c123..2cc3f8a8 100644 --- a/app/Protobuf/GoogleAuth/Payload/OtpParameters.php +++ b/app/Protobuf/GoogleAuth/Payload/OtpParameters.php @@ -38,11 +38,11 @@ class OtpParameters extends \Google\Protobuf\Internal\Message */ protected $type = 0; /** - * Generated from protobuf field optional int32 counter = 7; + * Generated from protobuf field optional uint64 counter = 7; */ protected $counter = null; /** - * Generated from protobuf field optional .google.protobuf.Any period = 8; + * Generated from protobuf field optional string period = 8; */ protected $period = null; @@ -58,8 +58,8 @@ class OtpParameters extends \Google\Protobuf\Internal\Message * @type int $algorithm * @type int $digits * @type int $type - * @type int $counter - * @type \Google\Protobuf\Any $period + * @type int|string $counter + * @type string $period * } */ public function __construct($data = NULL) { @@ -200,8 +200,8 @@ public function setType($var) } /** - * Generated from protobuf field optional int32 counter = 7; - * @return int + * Generated from protobuf field optional uint64 counter = 7; + * @return int|string */ public function getCounter() { @@ -219,25 +219,25 @@ public function clearCounter() } /** - * Generated from protobuf field optional int32 counter = 7; - * @param int $var + * Generated from protobuf field optional uint64 counter = 7; + * @param int|string $var * @return $this */ public function setCounter($var) { - GPBUtil::checkInt32($var); + GPBUtil::checkUint64($var); $this->counter = $var; return $this; } /** - * Generated from protobuf field optional .google.protobuf.Any period = 8; - * @return \Google\Protobuf\Any|null + * Generated from protobuf field optional string period = 8; + * @return string */ public function getPeriod() { - return $this->period; + return isset($this->period) ? $this->period : ''; } public function hasPeriod() @@ -251,13 +251,13 @@ public function clearPeriod() } /** - * Generated from protobuf field optional .google.protobuf.Any period = 8; - * @param \Google\Protobuf\Any $var + * Generated from protobuf field optional string period = 8; + * @param string $var * @return $this */ public function setPeriod($var) { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + GPBUtil::checkString($var, True); $this->period = $var; return $this;