|
6 | 6 | import com.azure.core.http.HttpClient;
|
7 | 7 | import com.azure.core.http.HttpPipeline;
|
8 | 8 | import com.azure.core.http.ProxyOptions;
|
9 |
| -import com.azure.core.util.ClientOptions; |
10 | 9 | import com.azure.core.util.Configuration;
|
11 | 10 | import com.azure.identity.implementation.IdentityClientOptions;
|
12 | 11 |
|
@@ -109,20 +108,22 @@ public T configuration(Configuration configuration) {
|
109 | 108 | }
|
110 | 109 |
|
111 | 110 | /**
|
112 |
| - * Sets the {@link IdentityLogOptions} which enables identity logging options to be set on the client. For example |
113 |
| - * configuring {@code accountIdentifierLogging} using |
114 |
| - * {@link com.azure.identity.IdentityLogOptions#setLoggingAccountIdentifiersAllowed(boolean)} to allow account |
115 |
| - * identifier logs to be enabled on client side debugging/monitoring purposes. |
| 111 | + * Enables account identifiers to be logged on client side for debugging/monitoring purposes. |
| 112 | + * By default, it is disabled. |
| 113 | + * <p> |
| 114 | + * The Account Identifier logs can contain sensitive information and should be enabled on protected machines only. |
| 115 | + * Enabling this logs Application ID, Object ID, Tenant ID and User Principal Name at INFO level when an |
| 116 | + * access token is successfully retrieved. Ensure that INFO level logs are enabled to |
| 117 | + * see the account identifier logs. |
| 118 | + * </p> |
116 | 119 | *
|
117 |
| - * @param identityLogOptions the {@link IdentityLogOptions} to be set on the credential client. |
118 |
| - * |
119 |
| - * @return An updated instance of this builder with the {@link ClientOptions} set as specified. |
| 120 | + * @return An updated instance of this builder. |
120 | 121 | */
|
121 | 122 | @SuppressWarnings("unchecked")
|
122 |
| - public T identityLogOptions(IdentityLogOptions identityLogOptions) { |
| 123 | + public T enableAccountIdentifierLogging() { |
123 | 124 | identityClientOptions
|
124 | 125 | .getIdentityLogOptionsImpl()
|
125 |
| - .setLoggingAccountIdentifiersAllowed(identityLogOptions.isLoggingAccountIdentifiersAllowed()); |
| 126 | + .setLoggingAccountIdentifiersAllowed(true); |
126 | 127 | return (T) this;
|
127 | 128 | }
|
128 | 129 | }
|
0 commit comments