Skip to content

Conversation

@shrayolacrayon
Copy link

@shrayolacrayon shrayolacrayon commented Oct 5, 2018

What

Some refactoring to make moving sso-proxy to use Sessions.SessionStore easier. This deletes the provider_default in sso-proxy and moves creating the full SignInURL and SignOutURL into providers package functions rather than being part of the interface.

cc @buzzfeed/sso-maintainers

katzdm
katzdm previously approved these changes Oct 18, 2018

// GetSignInURL with typical oauth parameters
func (p *SSOProvider) GetSignInURL(redirectURL *url.URL, state string) *url.URL {
var a url.URL
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Unless I'm missing a reason not to, let's write a := *p.Data().SignInURL() for consistency.

Also in GetSignOutURL() below.

}

// signRedirectURL signs the redirect url string, given a timestamp, and returns it
func signRedirectURL(clientSecret, rawRedirect string, timestamp time.Time) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I always double take when reading through code that uses this syntax pattern - Would you mind explicitly spelling the type string alongside clientSecret?

func signRedirectURL(clientSecret string, rawRedirect string, timestamp time.Time) string {

Copy link
Contributor

@loganmeetsworld loganmeetsworld left a comment

Choose a reason for hiding this comment

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

This LGTM

@shrayolacrayon shrayolacrayon dismissed stale reviews from loganmeetsworld and katzdm via 6cf0ad0 October 18, 2018 20:57
@shrayolacrayon shrayolacrayon force-pushed the proxy-remove-default-provider branch from 51ab4e5 to 6cf0ad0 Compare October 18, 2018 20:57
@shrayolacrayon shrayolacrayon force-pushed the proxy-remove-default-provider branch from 6cf0ad0 to a0dc38e Compare November 1, 2018 23:13
@shrayolacrayon shrayolacrayon force-pushed the proxy-remove-default-provider branch from a0dc38e to 6eee8aa Compare November 5, 2018 21:44
@shrayolacrayon shrayolacrayon merged commit 91df331 into master Nov 5, 2018
@shrayolacrayon shrayolacrayon deleted the proxy-remove-default-provider branch November 5, 2018 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants