-
Notifications
You must be signed in to change notification settings - Fork 6
The abstract client class #108
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
base: pairing&auth
Are you sure you want to change the base?
Conversation
Signed-off-by: Vlad Iftime <[email protected]>
…o pairing&auth Signed-off-by: Vlad Iftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
…he challange Signed-off-by: Vlad Iftime <[email protected]>
…hat are expected to be overwritten Signed-off-by: Vlad Iftime <[email protected]>
…hat are expected to be overwritten Signed-off-by: Vlad Iftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
MauriceHendrix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments to discuss, will look more closely later if I get some time
|
|
||
| REQTEST_TIMEOUT = 10 | ||
| PAIRING_TIMEOUT = datetime.timedelta(minutes=5) | ||
| KEY_ALGORITHM = "RSA-OAEP-256" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we need a discussion on what's the best default and how to communicate this
|
|
||
| # pylint: disable=too-many-instance-attributes | ||
| # pylint: disable=too-many-arguments | ||
| def __init__( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hhm I wonder if we want to couple the JWK and encryption methods inside the abstract class or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from jwskate import Jwk
|
A few general comments:
|
|
I had a quick look. |
Signed-off-by: Vlad Iftime <[email protected]>
* dropping python 3.8 adding 3.13 support
Signed-off-by: Vlad Iftime <[email protected]>
actually sorry @VladIftime looks like it needs to be one level up, I changed that myself |
|
I moved the backward compatibility fix as I suggested the wrong place, sorry. I Think you don't need the pass statements, but do need to add jwskate to dev-requirements.txt @VladIftime |
added jwskate to dev-requirements.txt
added pylint exception for # pylint: disable=too-many-arguments
|
@VladIftime see #119 for fixes to tests and linting errors |
* fixed linting errors * typing error in backwards compatibility fix * fixed missing requests typing * fixed missing import
| using the connection details and solved challenge. | ||
| Note: This is a placeholder implementation. In a real implementation, | ||
| this would use a WebSocket library like websocket-client or websockets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| this would use a WebSocket library like websocket-client or websockets. | |
| this uses a WebSocket library like websocket-client or websockets. |
| """ | ||
| if self._ws_connection: | ||
|
|
||
| logger.info("Would close WebSocket connection") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| logger.info("Would close WebSocket connection") | |
| logger.info("WebSocket connection closed") |
| self.send_header("Content-Type", "application/json") | ||
| self.end_headers() | ||
|
|
||
| # Create challenge (normally would be a JWE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Create challenge (normally would be a JWE) | |
| # Create challenge (normally a JWE) |
VladIftime
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the examples into the source.
|
The example would also serve to run an integration test. |
Co-authored-by: Dr Maurice Hendrix <[email protected]>
…thon into feat/abstract_client
This should represent an 'interface' for devs to use as a client for the WebSocket connection.