Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A simple implementation of userinfo endpoint#1201

Closed
jackielii wants to merge 1 commit into
dexidp:masterfrom
jackielii:feature/userinfo-endpoint
Closed

A simple implementation of userinfo endpoint#1201
jackielii wants to merge 1 commit into
dexidp:masterfrom
jackielii:feature/userinfo-endpoint

Conversation

@jackielii
Copy link
Copy Markdown
Contributor

@jackielii jackielii commented Mar 8, 2018

A stop gap to solve #376. Borrowed mostly from #1133.

The way it works is we create a signed jwt token as access_token (same claims as id token), on requesting /userinfo, it verifies the token and check it's not expired etc, and return the claims in json

IMHO, the full solution should involve the storage to implement similar logic for refresh_token. i.e. serialise access token and save in storage and retrieve upon requesting user info.

Because access token is opaque to the user, we can later roll in the proper solution without breaking API.

@jackielii jackielii force-pushed the feature/userinfo-endpoint branch from df4d57a to b2b85fe Compare March 10, 2018 11:42
@adebisi-fa
Copy link
Copy Markdown

Hello @jackielii,

You've saved a soul!

I just patched my dex deployment with this pull request and IT WORKED AWESOME!!!
Can't thank you enough.

Bravo!

@jackielii
Copy link
Copy Markdown
Contributor Author

Glad it helped. Please also note that the verify might fail if key is rotated. Our fork has advanced a lot, will update this one with the fix

@adebisi-fa
Copy link
Copy Markdown

adebisi-fa commented Jul 25, 2018

Please also note that the verify might fail if key is rotated.

Noted, please.

If you won't mind, can I "go get" from your fork?
The repo url will be of great help.

Thanks, please.

@jackielii
Copy link
Copy Markdown
Contributor Author

Our fork had a lot custom changes, I think I'll make the master branch of github.com/jackielii/dex up to date with this patch. will do it later

@jackielii jackielii force-pushed the feature/userinfo-endpoint branch from 8bca500 to e3489b9 Compare July 25, 2018 16:21
@jackielii
Copy link
Copy Markdown
Contributor Author

jackielii commented Jul 25, 2018

@adebisi-fa updated the PR.

I suggest you just clone the repo: https://github.com/jackielii/dex.git to $GOPATH/src/github.com/coreos/dex and checkout the feature/userinfo-endpoint branch. If I make my repo go-gettable, I'll have to re-write all the import path. I suggest you do it yourself.

@jackielii jackielii changed the title naive impl of userinfo endpoint A simple implementation of userinfo endpoint Jul 25, 2018
@adebisi-fa
Copy link
Copy Markdown

Whao, @jackielii !

I cannot thank you enough for this, honestly!
Really appreciate the time and effort you put into getting it this far!

I suggest you just clone the repo to $GOPATH/src/github.com/coreos/dex and checkout the feature/userinfo-endpoint branch.

I will do exactly that. Thanks, please.

Thank you!

@ccojocar
Copy link
Copy Markdown
Contributor

@srenatus @jackielii Any progress with this? Thanks

@jackielii
Copy link
Copy Markdown
Contributor Author

Hi @ccojocar, as far as this pr is concerned, it's finished.

@srenatus
Copy link
Copy Markdown
Contributor

I'll try to review this soon, sorry for radio silence here. 😅

@mdbraber
Copy link
Copy Markdown
Contributor

@srenatus any chance this will be merged?

@mdbraber mdbraber mentioned this pull request May 27, 2019
@mdbraber
Copy link
Copy Markdown
Contributor

I've adapted the code to the current branch: #1453

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

Successfully merging this pull request may close these issues.

5 participants