Closed fuh closed 2 years ago
@Steve0x2a @seriouszyx @Abingcbc @ComradeProgrammer please review
Hmm, guess we can turn self.algorithms
to singular instead (remove the 's' -> self.algorithm
).
Since this attribute should be a str
.
jwt.decode() method in PyJWT requires a list data type.
def decode(
self,
jwt: str,
key: str = "",
algorithms: Optional[List[str]] = None,
options: Optional[Dict] = None,
**kwargs,
) -> Dict[str, Any]:
@fuh uhhhh, sure!
Though digging into the source dependencies, the signature suggests it could be [Any | None]
.
def _verify_signature(
self,
signing_input,
header,
signature,
key="",
algorithms=None,
)
But yeah, let's go ahead and change it to a list.
Though you might want to test things out using $CASDOOR_PYTHON_SDK/src/tests/test_oauth.py
,
you should set up your own Casdoor instance to test it.
This repo is lack of maintenance, if you see anything suspicious, we might be able to try to work through it :)
@fuh @ffyuanda is this PR ready to merge?
@hsluoyz LGTM
@fuh can you also fix this? https://github.com/casdoor/casdoor-python-sdk/issues/10
@fuh can you resolve the conflicts?
@Steve0x2a can you make a PR to fix it?
Requires list data type