stevenmaguire / oauth2-keycloak

Keycloak Provider for OAuth 2.0 Client
MIT License
204 stars 151 forks source link

Fix update error #17

Closed colq2 closed 3 years ago

colq2 commented 5 years ago

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 parse application/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 see AbstractProvider line 694.

Airforce111 commented 5 years ago

Any chance we can get this merged?

Zaszczyk commented 4 years ago

@stevenmaguire can you merge it?

stevenmaguire commented 4 years ago

@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?

colq2 commented 4 years ago

Yes, I will add some tests soon.

stevenmaguire commented 4 years ago

Thank you!

walva commented 4 years ago

@colq2 do you need help on this? What is the current status?

colq2 commented 4 years ago

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:

image

image

"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.

stevenmaguire commented 4 years ago

I'm happy to add another contributor to this project - https://github.com/stevenmaguire/oauth2-keycloak/issues/27#issuecomment-659668506

mstefan21 commented 3 years ago

@arthurtemple Sorry for late reply, I will look at the end of this week and prepare relase of new version

mstefan21 commented 3 years ago

@arthurtemple Released as version 2.2.2

arthurtemple commented 3 years ago

@arthurtemple Released as version 2.2.2

Very nice, thanks!