Skip to content
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

jwt token decode isn't urlsafe #44

Open
sillidev opened this issue Aug 4, 2020 · 0 comments
Open

jwt token decode isn't urlsafe #44

sillidev opened this issue Aug 4, 2020 · 0 comments

Comments

@sillidev
Copy link

sillidev commented Aug 4, 2020

Hi,

I'm using this plugin to connect redmine & keycloak. Recently, I was informed an user cannot login redmine. After checking, the problem comes from the way we decode id_token

given this id_token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTY1MzIyNDUsImlhdCI6MTU5NjUyMjk3OSwiYXV0aF90aW1lIjoxNTk2NTIyOTc5LCJqdGkiOiIwZmRlNzRjNS1lYzBiLTQyZDUtODlhNS0zMDI1YzE1OWQ4NjAiLCJpc3MiOiJodHRwczovL3Nzby10ZXN0LmxvY2FsL2F1dGgvcmVhbG1zL2RlbW8iLCJhdWQiOiJyZWRtaW5lIiwic3ViIjoiMjFjMWRiYzQtM2M3MC00YzM3LTlkMWMtODM1OTBhMjZiNWNmIiwidHlwIjoiSUQiLCJhenAiOiJyZWRtaW5lIiwibm9uY2UiOiIyZWJjMjhiYi1lNTMyLTQxYWEtYTBkNS0xMzE0Yzg5MjlkMDciLCJzZXNzaW9uX3N0YXRlIjoiYjI2MjYxNmItNGNhNS00OGZiLWFkY2ItOTY2YzNhNTQwYzg0IiwiYWNyIjoiMSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwidXNlcl9uYW1lIjoibS5waGFtIiwibmFtZSI6IkPDqWRyaWMtSm_DqSBQT09UVEFSRU4iLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJtLnBoYW0iLCJnaXZlbl9uYW1lIjoiQ8OpZHJpYy1Kb8OpIiwibWVtYmVyX29mIjpbInVzZXIiXSwiZmFtaWx5X25hbWUiOiJQT09UVEFSRU4iLCJlbWFpbCI6Im0ucGhhbUBlbWFpbC5jb20ifQ.dRblJ7Nex4TBEQH6UNatVnNbUJYW6N122IOSMcee3SA

the output is
{"exp":1596532245,"iat":1596522979,"auth_time":1596522979,"jti":"0fde74c5-ec0b-42d5-89a5-3025c159d860","iss":"https://sso-test.local/auth/realms/demo","aud":"redmine","sub":"21c1dbc4-3c70-4c37-9d1c-83590a26b5cf","typ":"ID","azp":"redmine","nonce":"2ebc28bb-e532-41aa-a0d5-1314c8929d07","session_state":"b262616b-4ca5-48fb-adcb-966c3a540c84","acr":"1","email_verified":false,"user_name":"m.pham","name":"Cédric-J`�H������T�S����Y�\��Y��\�\��[YH���K���[H��]�[�ۘ[YH�����Y��X�R���H�Y[X�\��و��ȝ\�\����[Z[�Wۘ[YH��������T�S��[XZ���K���[P�[XZ[
���H�

which is not a valid json

I see we already have a PR for the fix #27 - can you help to review & merge it ?

Thanks

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

No branches or pull requests

1 participant