aboutsummaryrefslogtreecommitdiff
path: root/server/auth/github
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-04-10 21:18:42 +0100
committerNiall Sheridan <nsheridan@gmail.com>2017-04-10 21:38:33 +0100
commit30802e07b2d84fbc213b490d3402707dffe60096 (patch)
tree934aecb8f3582325dfd1aa6652193adac87d00db /server/auth/github
parentda7638dc112c4c106e8929601b642d2ca4596cba (diff)
update dependencies
Diffstat (limited to 'server/auth/github')
-rw-r--r--server/auth/github/github.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/auth/github/github.go b/server/auth/github/github.go
index d44a49d..d546478 100644
--- a/server/auth/github/github.go
+++ b/server/auth/github/github.go
@@ -1,6 +1,7 @@
package github
import (
+ "context"
"errors"
"net/http"
"time"
@@ -78,7 +79,7 @@ func (c *Config) Valid(token *oauth2.Token) bool {
return true
}
client := githubapi.NewClient(c.newClient(token))
- member, _, err := client.Organizations.IsMember(c.organization, c.Username(token))
+ member, _, err := client.Organizations.IsMember(context.TODO(), c.organization, c.Username(token))
if err != nil {
return false
}
@@ -120,7 +121,7 @@ func (c *Config) Exchange(code string) (*oauth2.Token, error) {
// Username retrieves the username portion of the user's email address.
func (c *Config) Username(token *oauth2.Token) string {
client := githubapi.NewClient(c.newClient(token))
- u, _, err := client.Users.Get("")
+ u, _, err := client.Users.Get(context.TODO(), "")
if err != nil {
return ""
}