Use logger for sensitive data logging to be able to disable it (#1002)
* Add sensible logging flag to default setup for logger * Use logger instead of fmt for info logging with sensible data * Remove sensible logging flag * Update CHANGELOG.md Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
		
							parent
							
								
									56075e3776
								
							
						
					
					
						commit
						57640764c0
					
				|  | @ -63,6 +63,7 @@ | |||
|   - Please note that `--cookie-refresh` must be 0 (the default) or equal to the token lifespan configured in Azure AD to make | ||||
|     Azure token refresh reliable. Setting this value to 0 means that it relies on the provider implementation | ||||
|     to decide if a refresh is required. | ||||
| - [#1002](https://github.com/oauth2-proxy/oauth2-proxy/pull/1002) Use logger for logging refreshed session in azure and gitlab provider. | ||||
| 
 | ||||
| ## Changes since v6.1.1 | ||||
| 
 | ||||
|  |  | |||
|  | @ -172,7 +172,7 @@ func (p *AzureProvider) RefreshSessionIfNeeded(ctx context.Context, s *sessions. | |||
| 		return false, fmt.Errorf("unable to redeem refresh token: %v", err) | ||||
| 	} | ||||
| 
 | ||||
| 	fmt.Printf("refreshed id token %s (expired on %s)\n", s, origExpiration) | ||||
| 	logger.Printf("refreshed id token %s (expired on %s)\n", s, origExpiration) | ||||
| 	return true, nil | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -135,7 +135,7 @@ func (p *GitLabProvider) RefreshSessionIfNeeded(ctx context.Context, s *sessions | |||
| 		return false, fmt.Errorf("unable to redeem refresh token: %v", err) | ||||
| 	} | ||||
| 
 | ||||
| 	fmt.Printf("refreshed id token %s (expired on %s)\n", s, origExpiration) | ||||
| 	logger.Printf("refreshed id token %s (expired on %s)\n", s, origExpiration) | ||||
| 	return true, nil | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue