nokia / kong-oidc

OIDC plugin for Kong
Apache License 2.0
454 stars 321 forks source link

X-UserInfo's content is unexpected #71

Open ShiningRush opened 5 years ago

ShiningRush commented 5 years ago

Now I am able to access my api with oidc plugins, then i found the X-UserInfo of request header is a base64 string, and i decoded it like that

{
  "sub": ....
  "id": ....
}

I consider oidc plugin should get content from userinfo endpoint ( https://github.com/nokia/kong-oidc/issues/15#issuecomment-335040470 ),

So it should be least three fields same with return of my userinfo endpoint, If content is from id_token, it should be least five fields, But now there is just two field in X-UserInfo, Am i miss something configured?

Trojan295 commented 5 years ago

Could you post the response from your OIDC Providers X-Userinfo endpoint?

ShiningRush commented 5 years ago

Here is response of my userinfo endpoint:

{"sub":"b5b7e48b-e785-4fd1-bf4e-e78f2ce8b305","email":"huyichao@followme.com","email_verified":true}#
Trojan295 commented 5 years ago

That's strange. What OIDC Provider are you using?

ShiningRush commented 5 years ago

I'm using openiddict as OIDC provider.

NarasimhaSwamy commented 4 years ago

@ShiningRush what is the response_type value you have configured.