This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
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.
Replace pyjwt with authlib in
org.matrix.login.jwt
#13011Replace pyjwt with authlib in
org.matrix.login.jwt
#13011Changes from 1 commit
074cdf7
338ae35
13bccbb
3891e0a
5a7e7b0
629ef41
8e78b79
b4e56a1
a650138
470dc0b
382d02f
8aa6a11
395997e
81c525c
0039fe7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 want a replacement for this, to warn users who've configured JWT but haven't installed authlib.
check_dependencies("jwt")
should suffice after the poetry-related changes are made. For an existing example elsewhere, see:synapse/synapse/config/redis.py
Line 32 in 4586119
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 think this is still outstanding.
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.
@sandhose pointed out that this is a pretty broad exception clause. Can you narrow this to a JOSE-specific exception?
Perhaps
JoseError
from here? https://github.com/lepture/authlib/blob/master/authlib/jose/errors.pyThere 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.
(That will mean that any other exception gets properly flagged as an application error rather than causing a 403 to the requester.)
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.
Fixed and pushed it