-
Notifications
You must be signed in to change notification settings - Fork 184
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
sso-proxy: remove default provider and unused functions #87
Conversation
cbdfeab
to
51ab4e5
Compare
internal/proxy/providers/sso.go
Outdated
|
||
// GetSignInURL with typical oauth parameters | ||
func (p *SSOProvider) GetSignInURL(redirectURL *url.URL, state string) *url.URL { | ||
var a url.URL |
There was a problem hiding this comment.
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.
internal/proxy/providers/sso.go
Outdated
@@ -383,3 +386,43 @@ func (p *SSOProvider) ValidateSessionState(s *SessionState, allowedGroups []stri | |||
|
|||
return true | |||
} | |||
|
|||
// signRedirectURL signs the redirect url string, given a timestamp, and returns it | |||
func signRedirectURL(clientSecret, rawRedirect string, timestamp time.Time) string { |
There was a problem hiding this comment.
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 {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM
6cf0ad0
51ab4e5
to
6cf0ad0
Compare
6cf0ad0
to
a0dc38e
Compare
a0dc38e
to
6eee8aa
Compare
What
Some refactoring to make moving sso-proxy to use
Sessions.SessionStore
easier. This deletes theprovider_default
in sso-proxy and moves creating the fullSignInURL
andSignOutURL
into providers package functions rather than being part of the interface.cc @buzzfeed/sso-maintainers