Closed colq2 closed 3 years ago
Any chance we can get this merged?
@stevenmaguire can you merge it?
@colq2 Thanks for your patience on this. I have been reluctant to simply merge this as is because of the lack of test cases that demonstrate the specific use case that is being addressed here. Would you mind adding some specific tests to cover this use case?
Yes, I will add some tests soon.
Thank you!
@colq2 do you need help on this? What is the current status?
Hello @lobodol and @stevenmaguire,
I looked into it again today. Every test you need is already there. If we remove the parseResponse
function from Keycloak.php
two test will fail:
"Invalid response received from Authorization Server. Expected JSON." is an exception which occurs because, as I said, keycloak responses with just a string.
I think there is no reason why you would not merge this.
I'm happy to add another contributor to this project - https://github.com/stevenmaguire/oauth2-keycloak/issues/27#issuecomment-659668506
@arthurtemple Sorry for late reply, I will look at the end of this week and prepare relase of new version
@arthurtemple Released as version 2.2.2
@arthurtemple Released as version 2.2.2
Very nice, thanks!
This pull request solves #15 .
The problem was
parseResponse
function from AbstractProvider which force the reponse to be an array and have no possibility to parseapplication/jwt
. If we use encrypted userinfo endpoint we are getting only the jwt token which is a simple string.This results in an
UnexpectedValueException
with the message An OAuth server error was encountered that did not contain a JSON body. Also seeAbstractProvider
line 694.