-
Notifications
You must be signed in to change notification settings - Fork 0
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
11 adapt to reference implementation #12
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/python-package.yml
Outdated
@@ -49,8 +49,10 @@ jobs: | |||
tox run | |||
env: | |||
CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} |
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.
please the following order: project id, api secret, frontend api, backend api
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.
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. |
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.
frontend api before backend api
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.
done
src/corbado_python_sdk/config.py
Outdated
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". |
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.
we can remove this, we should not need that anymore
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.
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, |
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.
remove this
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.
Removed
ISSUER_MISSMATCH (str): Indicates that the token issuer does not match the expected issuer. | ||
""" | ||
|
||
INVALID_TOKEN = "Invalid token" # noqa s105 |
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.
shouldnot we have the following codes like in go:
CodeJWTGeneral Code = iota
CodeJWTIssuerMismatch
CodeJWTInvalidData
CodeJWTInvalidSignature
CodeJWTBefore
CodeJWTExpired
CodeJWTIssuerEmpty
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.
Done, but due to different JWT implementation in Java and Python and error handling not all abovementioned error may get caught.
@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): |
@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.