Commit eacb7c8a by Dan Cech Committed by GitHub

Merge pull request #6584 from tomkozlowski/bugfix/oauth-login-bearer-token

explicitly set oauth2 token to Bearer Type
parents e7a30ac4 a353c8d1
......@@ -96,7 +96,7 @@ func OAuthLogin(ctx *middleware.Context) {
}
sslcli := &http.Client{Transport: tr}
oauthCtx = context.TODO()
oauthCtx = context.Background()
oauthCtx = context.WithValue(oauthCtx, oauth2.HTTPClient, sslcli)
}
......@@ -106,6 +106,8 @@ func OAuthLogin(ctx *middleware.Context) {
ctx.Handle(500, "login.OAuthLogin(NewTransportWithCode)", err)
return
}
// token.TokenType was defaulting to "bearer", which is out of spec, so we explicitly set to "Bearer"
token.TokenType = "Bearer"
ctx.Logger.Debug("OAuthLogin Got token")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment