Abstract Server class and a default implementation#122
Open
VladIftime wants to merge 30 commits intofeat/abstract_clientfrom
Open
Abstract Server class and a default implementation#122VladIftime wants to merge 30 commits intofeat/abstract_clientfrom
VladIftime wants to merge 30 commits intofeat/abstract_clientfrom
Conversation
Signed-off-by: F.N. Claessen <felix@seita.nl>
…thon into feat/abstract_server
* refactor: split up default server class into parts handling tokens and challenges and part setting up a default HTTP server Signed-off-by: F.N. Claessen <felix@seita.nl> * dev: remove abstract methods to start and stop the server Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: actually remove abstract methods to start and stop the server Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: util function for creating JSON response Signed-off-by: F.N. Claessen <felix@seita.nl> * style: extra linebreak Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: subclass S2DefaultHTTPHandler so we can reuse new class method Signed-off-by: F.N. Claessen <felix@seita.nl> * dev: temporarily decrease the pylint acceptance criterion Signed-off-by: F.N. Claessen <felix@seita.nl> * style: add type annotations Signed-off-by: F.N. Claessen <felix@seita.nl> * style: add return type annotation Signed-off-by: F.N. Claessen <felix@seita.nl> * style: compatibility with Python 3.8 Signed-off-by: F.N. Claessen <felix@seita.nl> --------- Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…tivate the controll type
Signed-off-by: F.N. Claessen <felix@seita.nl>
…er/s2-python into feat/abstract_server
…atus Signed-off-by: F.N. Claessen <felix@seita.nl>
…er/s2-python into feat/abstract_server
…on status on the server side Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…bsocket connection of the client in order to make sure messages are sent to the right RM.
…er/s2-python into feat/abstract_server
MauriceHendrix
requested changes
Jun 17, 2025
| dist/ | ||
| build/ | ||
| %LOCALAPPDATA% | ||
| temp_java/ |
Contributor
There was a problem hiding this comment.
what's that about? (Seems a bit odd in a python library is all)
tox.ini
Outdated
| -r dev-requirements.txt | ||
| commands = | ||
| pylint src/ tests/unit/ | ||
| pylint src/ tests/unit/ --fail-under=9.8 |
Contributor
There was a problem hiding this comment.
what's the reson behind this?
| import json | ||
|
|
||
|
|
||
| async def hello(): |
Contributor
There was a problem hiding this comment.
can we come up with a better name than hello for the test?
| uri = "ws://localhost:8080" # <-- Replace with your server's URI | ||
| try: | ||
| async with websockets.connect(uri) as websocket: | ||
| message = Handshake( |
Contributor
There was a problem hiding this comment.
In the final implementation I'd expect the websocket server to require a valid authorisation header?
examples/example_pairing_frbc_rm.py
Outdated
| @@ -82,7 +82,6 @@ | |||
| logger.info("Starting S2 session...") | |||
| start_s2_session( | |||
Contributor
There was a problem hiding this comment.
You'd need to add the decrypted chellange as bearer token
| Tuple[str, str]: (public_key, private_key) pair as base64 encoded strings | ||
| """ | ||
| logger.info("Generating key pair") | ||
| self._key_pair = Jwk.generate_for_alg("RSA-OAEP-256").with_kid_thumbprint() |
Contributor
There was a problem hiding this comment.
I guess you wnat to pick the algorithm based on what the client posted?
…he ws connection Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.