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

connector: add RefreshConnector interface #702

Merged
merged 3 commits into from
Nov 22, 2016

Conversation

ericchiang
Copy link
Contributor

@ericchiang ericchiang commented Nov 19, 2016

This is a work in progress to add a RefreshConnector interface so refresh token requests query the upstream identity provider before returning.

Lots of testing needed.

Closes #693
Updates #678

@ericchiang ericchiang changed the title connector: add RefreshConnector interface [WIP] connector: add RefreshConnector interface Nov 21, 2016
@ericchiang ericchiang force-pushed the connector-interface-cleanup branch 3 times, most recently from 87a4f9e to f1e45b0 Compare November 22, 2016 00:45
@ericchiang
Copy link
Contributor Author

Tests added. Manually tested LDAP and GitHub. cc @rithujohn191 ready for review


// If a user has updated their username, that will be reflected in the
// refreshed token.
identity.Username = p.Username
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the identity.Username the only field that can be updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, this is a bug, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I think that practically this is the only field that could be updated. Email can't be because it's used as the ID and this doesn't deal with groups. Will expand the comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Contributor

@rithujohn191 rithujohn191 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Might be helpful to add some more comments.

Email string `json:"email"`
}

func (c *githubConnector) user(ctx context.Context, client *http.Client) (user, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be helpful to add some comments to describe user and teams functions

@ericchiang
Copy link
Contributor Author

comments addressed.

@rithujohn191
Copy link
Contributor

lgtm

@rithujohn191 rithujohn191 merged commit 5ed42be into dexidp:master Nov 22, 2016
@ericchiang ericchiang deleted the connector-interface-cleanup branch November 22, 2016 21:26
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.

2 participants