Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(webhosting): use password in base64 #974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions scaleway-async/scaleway_async/webhosting/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@ def unmarshal_HostingUser(data: Any) -> HostingUser:
else:
args["one_time_password"] = None

field = data.get("one_time_password_b64", None)
if field is not None:
args["one_time_password_b64"] = field
else:
args["one_time_password_b64"] = None

return HostingUser(**args)


Expand Down Expand Up @@ -913,9 +919,15 @@ def unmarshal_ResetHostingPasswordResponse(data: Any) -> ResetHostingPasswordRes

args: Dict[str, Any] = {}

field = data.get("one_time_password_b64", None)
if field is not None:
args["one_time_password_b64"] = field

field = data.get("one_time_password", None)
if field is not None:
args["one_time_password"] = field
else:
args["one_time_password"] = None

return ResetHostingPasswordResponse(**args)

Expand Down
20 changes: 15 additions & 5 deletions scaleway-async/scaleway_async/webhosting/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class PlatformControlPanel:

urls: Optional[PlatformControlPanelUrls]
"""
URL to connect to cPanel dashboard and to Webmail interface.
URL to connect to control panel dashboard and to Webmail interface.
"""


Expand Down Expand Up @@ -426,7 +426,7 @@ class Nameserver:
class HostingUser:
username: str
"""
Main Web Hosting cPanel username.
Main Web Hosting control panel username.
"""

contact_email: str
Expand All @@ -436,7 +436,12 @@ class HostingUser:

one_time_password: Optional[str]
"""
One-time-password used for the first login or reset password, empty after first use.
One-time-password used for the first login to the control panel, cleared after first use (deprecated, use password_b64 instead).
"""

one_time_password_b64: Optional[str]
"""
One-time-password used for the first login to the control panel, cleared after first use, encoded in base64.
"""


Expand Down Expand Up @@ -1789,9 +1794,14 @@ class OfferApiListOffersRequest:

@dataclass
class ResetHostingPasswordResponse:
one_time_password: str
one_time_password_b64: str
"""
New temporary password, encoded in base64.
"""

one_time_password: Optional[str]
"""
New temporary password.
New temporary password (deprecated, use password_b64 instead).
"""


Expand Down
12 changes: 12 additions & 0 deletions scaleway/scaleway/webhosting/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@ def unmarshal_HostingUser(data: Any) -> HostingUser:
else:
args["one_time_password"] = None

field = data.get("one_time_password_b64", None)
if field is not None:
args["one_time_password_b64"] = field
else:
args["one_time_password_b64"] = None

return HostingUser(**args)


Expand Down Expand Up @@ -913,9 +919,15 @@ def unmarshal_ResetHostingPasswordResponse(data: Any) -> ResetHostingPasswordRes

args: Dict[str, Any] = {}

field = data.get("one_time_password_b64", None)
if field is not None:
args["one_time_password_b64"] = field

field = data.get("one_time_password", None)
if field is not None:
args["one_time_password"] = field
else:
args["one_time_password"] = None

return ResetHostingPasswordResponse(**args)

Expand Down
20 changes: 15 additions & 5 deletions scaleway/scaleway/webhosting/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class PlatformControlPanel:

urls: Optional[PlatformControlPanelUrls]
"""
URL to connect to cPanel dashboard and to Webmail interface.
URL to connect to control panel dashboard and to Webmail interface.
"""


Expand Down Expand Up @@ -426,7 +426,7 @@ class Nameserver:
class HostingUser:
username: str
"""
Main Web Hosting cPanel username.
Main Web Hosting control panel username.
"""

contact_email: str
Expand All @@ -436,7 +436,12 @@ class HostingUser:

one_time_password: Optional[str]
"""
One-time-password used for the first login or reset password, empty after first use.
One-time-password used for the first login to the control panel, cleared after first use (deprecated, use password_b64 instead).
"""

one_time_password_b64: Optional[str]
"""
One-time-password used for the first login to the control panel, cleared after first use, encoded in base64.
"""


Expand Down Expand Up @@ -1789,9 +1794,14 @@ class OfferApiListOffersRequest:

@dataclass
class ResetHostingPasswordResponse:
one_time_password: str
one_time_password_b64: str
"""
New temporary password, encoded in base64.
"""

one_time_password: Optional[str]
"""
New temporary password.
New temporary password (deprecated, use password_b64 instead).
"""


Expand Down