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

add Refresh() to mock passwordConnector #1245

Merged
merged 1 commit into from
Oct 25, 2018

Conversation

scotthew1
Copy link
Contributor

we've been using the mock passwordConnector for some internal testing, but it doesn't satisfy the RefreshConnector interface. this change fixes that.

Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

one nitpick, lgtm

@@ -112,3 +112,7 @@ func (p passwordConnector) Login(ctx context.Context, s connector.Scopes, userna
}

func (p passwordConnector) Prompt() string { return "" }

func (p passwordConnector) Refresh(ctx context.Context, s connector.Scopes, identity connector.Identity) (connector.Identity, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] if ctx and s aren't used, let's go with

func (p passwordConnector) Refresh(_ context.Context, _ connector.Scopes, identity connector.Identity) (connector.Identity, error) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@srenatus updated

@scotthew1 scotthew1 force-pushed the mock-connector-refresh branch from 5180dcb to f8e0db6 Compare June 5, 2018 20:38
@scotthew1
Copy link
Contributor Author

@ericchiang ?

Copy link

@andremarianiello andremarianiello left a comment

Choose a reason for hiding this comment

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

LGTM

@scotthew1
Copy link
Contributor Author

@srenatus any chance you're able to merge this now that the repo has moved?

@srenatus
Copy link
Contributor

@scotthew1 I don't see why not, indeed. Just one more nitpick: Could you add something like

_ connector.RefreshConnector = passwordConnector{}

next to that one, since that's what the addition does, make the mock connector satisfy RefreshConnector?

@scotthew1 scotthew1 force-pushed the mock-connector-refresh branch from f8e0db6 to 2707302 Compare September 21, 2018 15:55
@scotthew1
Copy link
Contributor Author

@srenatus updated. also rebased on master

@seanlaff
Copy link

Status update?

Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

Thank you! 🎉

@srenatus srenatus merged commit 65b0c91 into dexidp:master Oct 25, 2018
mmrath pushed a commit to mmrath/dex that referenced this pull request Sep 2, 2019
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.

4 participants