mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Changed documentation style to doxygen
CURA-5744
This commit is contained in:
parent
d5dbf91a4f
commit
1c8804ff2c
5 changed files with 62 additions and 97 deletions
|
@ -8,21 +8,19 @@ if TYPE_CHECKING:
|
|||
from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers
|
||||
|
||||
|
||||
# The authorization request callback handler server.
|
||||
# This subclass is needed to be able to pass some data to the request handler.
|
||||
# This cannot be done on the request handler directly as the HTTPServer creates an instance of the handler after
|
||||
# init.
|
||||
class AuthorizationRequestServer(HTTPServer):
|
||||
"""
|
||||
The authorization request callback handler server.
|
||||
This subclass is needed to be able to pass some data to the request handler.
|
||||
This cannot be done on the request handler directly as the HTTPServer creates an instance of the handler after init.
|
||||
"""
|
||||
|
||||
# Set the authorization helpers instance on the request handler.
|
||||
def setAuthorizationHelpers(self, authorization_helpers: "AuthorizationHelpers") -> None:
|
||||
"""Set the authorization helpers instance on the request handler."""
|
||||
self.RequestHandlerClass.authorization_helpers = authorization_helpers # type: ignore
|
||||
|
||||
# Set the authorization callback on the request handler.
|
||||
def setAuthorizationCallback(self, authorization_callback: Callable[["AuthenticationResponse"], Any]) -> None:
|
||||
"""Set the authorization callback on the request handler."""
|
||||
self.RequestHandlerClass.authorization_callback = authorization_callback # type: ignore
|
||||
|
||||
# Set the verification code on the request handler.
|
||||
def setVerificationCode(self, verification_code: str) -> None:
|
||||
"""Set the verification code on the request handler."""
|
||||
self.RequestHandlerClass.verification_code = verification_code # type: ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue