Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Library does not work with Keycloak version 23.0.3 #105

Description

@nemomar

I tried to run the simplest example described in the documentation with Keycloak 23.0.3 and Python (3.8 and 3.10) . I configured Keycloak as described in the documentation. The FastApi is running but any call wails when the token needs to be decoded with the following error:
File "/home/web/sandbox/doru/rveng/keycloakapp.py", line 229, in get_current_user
decoded_token = self._decode_token(token=token, audience="account")
File "/home/web/sandbox/doru/rveng/keycloakapp.py", line 1151, in _decode_token
return jwt.decode(
File "/home/web/sandbox/doru/venv_rdkey8/lib/python3.8/site-packages/jose/jwt.py", line 142, in decode
payload = jws.verify(token, key, algorithms, verify=verify_signature)
File "/home/web/sandbox/doru/venv_rdkey8/lib/python3.8/site-packages/jose/jws.py", line 70, in verify
header, payload, signing_input, signature = _load(token)
File "/home/web/sandbox/doru/venv_rdkey8/lib/python3.8/site-packages/jose/jws.py", line 176, in _load
signing_input, crypto_segment = jwt.rsplit(b".", 1)
AttributeError: 'OAuth2PasswordBearer' object has no attribute 'rsplit'

Is anybody still using the fastapi-keycloak library? Can anybody point me in any direction?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions