Exclude full OAuth token details from printing out on stdout (#55426)

* remove token details from printing out on stdout

* Update login_oauth.go

* address comment
This commit is contained in:
Junaid Ali 2022-10-11 16:20:49 +01:00 committed by GitHub
parent 9db61f54ff
commit 33eb4a2807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,7 @@ func (hs *HTTPServer) OAuthLogin(ctx *models.ReqContext) {
// token.TokenType was defaulting to "bearer", which is out of spec, so we explicitly set to "Bearer" // token.TokenType was defaulting to "bearer", which is out of spec, so we explicitly set to "Bearer"
token.TokenType = "Bearer" token.TokenType = "Bearer"
oauthLogger.Debug("OAuthLogin: got token", "token", fmt.Sprintf("%+v", token)) oauthLogger.Debug("OAuthLogin: got token", "expiry", fmt.Sprintf("%v", token.Expiry))
// set up oauth2 client // set up oauth2 client
client := connect.Client(oauthCtx, token) client := connect.Client(oauthCtx, token)