Overview
The article covers how to log HTTP response headers with auth0-java.
Applies To
- Auth0-java SDK
Solution
Log the response headers with LoggingOptions:
LoggingOptions loggingOptions = new LoggingOptions(LoggingOptions.LogLevel.HEADERS);
Set<String> headersToRedact = Collections.singleton("Authorization");
loggingOptions.setHeadersToRedact(headersToRedact);
HttpOptions httpOptions = new HttpOptions();
httpOptions.setLoggingOptions(loggingOptions);
ManagementAPI api = new ManagementAPI(DOMAIN, API_TOKEN, httpOptions);