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

Interoperability with OAuth2 Server Library for PHP #99

Closed
tgal opened this issue Apr 7, 2019 · 6 comments
Closed

Interoperability with OAuth2 Server Library for PHP #99

tgal opened this issue Apr 7, 2019 · 6 comments

Comments

@tgal
Copy link

tgal commented Apr 7, 2019

When trying to get Vouch to talk to a Symfony app with this PHP library (see https://github.com/bshaffer/oauth2-server-bundle) after successful authentication Vouch aborts with this error message:

INFO    OpenID userinfo body: %!(EXTRA string={"id":"me@myemailprovider.com","name":" "})
ERROR   json: cannot unmarshal string into Go struct field User.id of type int

The email address (me@myemailprovider.com) in the OpenID userinfo body is the primary user id in the Symfony app and I am expecting it in the X-Vouch-User HTTP header.

Any hints what's wrong here?

@bnfinet
Copy link
Member

bnfinet commented Apr 7, 2019 via email

@tgal
Copy link
Author

tgal commented Apr 7, 2019

No, unfortunately it is not possible to remove the 'id' field or have it return an integer.

@bnfinet
Copy link
Member

bnfinet commented Apr 7, 2019 via email

@tgal
Copy link
Author

tgal commented Apr 7, 2019

Thanks for your reply, after all it was possible to have PHP return the OpenID userinfo as 'email' and now it all works. Thanks for providing this excellent piece of software!

@tgal tgal closed this as completed Apr 7, 2019
@bnfinet
Copy link
Member

bnfinet commented Apr 7, 2019 via email

@tgal
Copy link
Author

tgal commented Apr 7, 2019

It was not the PHP library's fault and least of all, Vault's. The PHP app's user_info_url endpoint now simply returns {"email":"me@myemailprovider.com"} instead of formerly {"id":"me@myemailprovider.com"}. It was a change in the way the PHP library was used. Thanks again!

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

2 participants