8000 11 adapt to reference implementation by alexbalakirev · Pull Request #12 · corbado/corbado-python · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

11 adapt to reference implementation #12

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 30 commits into from
Jan 23, 2025

Conversation

alexbalakirev
Copy link
Contributor

@corbadoman Ready for review. To make a deployment for the new version I need CORBADO_FRONTEND_API secret. After that I could update the example applications if needed.

@alexbalakirev alexbalakirev self-assigned this Oct 27, 2024
@alexbalakirev alexbalakirev linked an issue Oct 27, 2024 that may be closed by this pull request
10 tasks
@@ -49,8 +49,10 @@ jobs:
tox run
env:
CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please the following order: project id, api secret, frontend api, backend api

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

backend_api (str): The base URL for the backend API. Defaults to "https://backendapi.cloud.corbado.io/v2".
short_session_cookie_name (str): The name of the cookie for short session management. Defaults to "cbo_short_session".
backend_api (str): The base URL for the backend API.
frontend_api (str): The base URL for the frontend API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

frontend api before backend api

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

short_session_cookie_name (str): The name of the cookie for short session management. Defaults to "cbo_short_session".
backend_api (str): The base URL for the backend API.
frontend_api (str): The base URL for the frontend API.
session_token_cookie_name (str): The name of the cookie for short session management. Defaults to "cbo_session_token".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this, we should not need that anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@@ -70,9 +70,10 @@ def sessions(self) -> SessionService:
"""
if not self._sessions:
self._sessions = SessionService(
short_session_cookie_name=self.config.short_session_cookie_name,
session_token_cookie_name=self.config.session_token_cookie_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

ISSUER_MISSMATCH (str): Indicates that the token issuer does not match the expected issuer.
"""

INVALID_TOKEN = "Invalid token" # noqa s105
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnot we have the following codes like in go:

CodeJWTGeneral Code = iota
CodeJWTIssuerMismatch
CodeJWTInvalidData
CodeJWTInvalidSignature
CodeJWTBefore
CodeJWTExpired
CodeJWTIssuerEmpty

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, but due to different JWT implementation in Java and Python and error handling not all abovementioned error may get caught.

@lukaskratzel
Copy link
Contributor

@alexbalakirev How can I use this version in my test project? Did you release it under some pre-release tag?

@alexbalakirev
Copy link
Contributor Author

@alexbalakirev How can I use this version in my test project? Did you release it under some pre-release tag?

@lukaskratzel You can use/install this branch locally. Since this PR is not merged/reviewed, I have not deployed this version on PyPI. This branch has version 2.0.0 (as in VERSION file). You can use following command to install local version of the project (in this case SDK):
python -m pip install -e "path/to/sdk/project/root
Make sure your requirements.txt from example project has dependency on: passkeys >= 2.0.0

@lukaskratzel lukaskratzel force-pushed the 11-adapt-to-reference-implementation branch from 454f0ea to 43de3c2 Compare January 23, 2025 11:16
@lukaskratzel
Copy link
Contributor

@alexbalakirev Are you working on this right now?

@alexbalakirev
Copy link
Contributor Author

@alexbalakirev Are you working on this right now?

I am reviewing your changes and added CI/CD test to run on this branch too, so we can validate the correctness of the changes. You can text me on Slack to talk about non-code or organizational related topics.

@lukaskratzel lukaskratzel merged commit 9b7a678 into main Jan 23, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt to reference implementation
3 participants
0