Skip to content

Commit 57a6798

Browse files
committed
Address review: remove legacy examples, logLevel, interceptors from docs
1 parent 16bc8ea commit 57a6798

File tree

2 files changed

+1
-57
lines changed

2 files changed

+1
-57
lines changed

EXAMPLES.md

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3227,17 +3227,6 @@ account.setNetworkingClient(netClient);
32273227
```
32283228
</details>
32293229

3230-
<details>
3231-
<summary>Legacy constructor (still supported)</summary>
3232-
3233-
```kotlin
3234-
val netClient = DefaultClient(
3235-
connectTimeout = 30,
3236-
readTimeout = 30
3237-
)
3238-
```
3239-
</details>
3240-
32413230
### Logging configuration
32423231

32433232
```kotlin
@@ -3249,12 +3238,11 @@ val account = Auth0.getInstance("{YOUR_CLIENT_ID}", "{YOUR_DOMAIN}")
32493238
account.networkingClient = netClient
32503239
```
32513240

3252-
You can also customize the log level and provide a custom logger:
3241+
You can also provide a custom logger to control where logs are written:
32533242

32543243
```kotlin
32553244
val netClient = DefaultClient.Builder()
32563245
.enableLogging(true)
3257-
.logLevel(HttpLoggingInterceptor.Level.HEADERS) // NONE, BASIC, HEADERS, or BODY (default)
32583246
.logger(HttpLoggingInterceptor.Logger { message -> Log.d("Auth0Http", message) })
32593247
.build()
32603248
```
@@ -3265,23 +3253,12 @@ val netClient = DefaultClient.Builder()
32653253
```java
32663254
DefaultClient netClient = new DefaultClient.Builder()
32673255
.enableLogging(true)
3268-
.logLevel(HttpLoggingInterceptor.Level.HEADERS)
32693256
.build();
32703257
Auth0 account = Auth0.getInstance("client id", "domain");
32713258
account.setNetworkingClient(netClient);
32723259
```
32733260
</details>
32743261

3275-
<details>
3276-
<summary>Legacy constructor (still supported)</summary>
3277-
3278-
```kotlin
3279-
val netClient = DefaultClient(
3280-
enableLogging = true
3281-
)
3282-
```
3283-
</details>
3284-
32853262
### Set additional headers for all requests
32863263

32873264
```kotlin
@@ -3308,37 +3285,6 @@ account.setNetworkingClient(netClient);
33083285
```
33093286
</details>
33103287

3311-
<details>
3312-
<summary>Legacy constructor (still supported)</summary>
3313-
3314-
```kotlin
3315-
val netClient = DefaultClient(
3316-
defaultHeaders = mapOf("{HEADER-NAME}" to "{HEADER-VALUE}")
3317-
)
3318-
```
3319-
</details>
3320-
3321-
### Custom interceptors
3322-
3323-
You can add custom OkHttp interceptors to the `DefaultClient` for use cases such as auth token injection, analytics, or certificate pinning:
3324-
3325-
```kotlin
3326-
val netClient = DefaultClient.Builder()
3327-
.addInterceptor(Interceptor { chain ->
3328-
val request = chain.request().newBuilder()
3329-
.addHeader("X-Request-Id", UUID.randomUUID().toString())
3330-
.build()
3331-
chain.proceed(request)
3332-
})
3333-
.addInterceptor(myAnalyticsInterceptor)
3334-
.build()
3335-
3336-
val account = Auth0.getInstance("{YOUR_CLIENT_ID}", "{YOUR_DOMAIN}")
3337-
account.networkingClient = netClient
3338-
```
3339-
3340-
Interceptors are invoked in the order they were added, after the built-in retry interceptor and before the logging interceptor.
3341-
33423288
### Advanced configuration
33433289

33443290
For more advanced configuration of the networking client, you can provide a custom implementation of `NetworkingClient`. This may be useful when you wish to reuse your own networking client, configure a proxy, etc.

V4_MIGRATION_GUIDE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ val client = DefaultClient.Builder()
120120
.writeTimeout(30)
121121
.callTimeout(120)
122122
.enableLogging(true)
123-
.logLevel(HttpLoggingInterceptor.Level.HEADERS)
124-
.addInterceptor(myCustomInterceptor)
125123
.build()
126124
```
127125

0 commit comments

Comments
 (0)