You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This feature is currently available in [Early Access](https://auth0.com/docs/troubleshoot/product-lifecycle/product-release-stages#early-access). Please reach out to Auth0 support to get it enabled for your tenant.
217
217
218
-
[DPoP](https://www.rfc-editor.org/rfc/rfc9449.html) (Demonstrating Proof of Possession) is an application-level mechanism for sender-constraining OAuth 2.0 access and refresh tokens by proving that the app is in possession of a certain private key. You can enable it by calling the `useDPoP(context:Context)` method.
218
+
[DPoP](https://www.rfc-editor.org/rfc/rfc9449.html) (Demonstrating Proof of Possession) is an application-level mechanism for sender-constraining OAuth 2.0 access and refresh tokens by proving that the app is in possession of a certain private key. You can enable it by calling the `useDPoP()` method.
@@ -241,7 +241,7 @@ When making requests to your own APIs, use the `DPoP.getHeaderData()` method to
241
241
```kotlin
242
242
val url ="https://example.com/api/endpoint"
243
243
val httpMethod ="GET"
244
-
val headerData =DPoPProvider.getHeaderData(
244
+
val headerData =DPoP.getHeaderData(
245
245
httpMethod, url,
246
246
accessToken, tokenType
247
247
)
@@ -252,10 +252,10 @@ httpRequest.apply{
252
252
}
253
253
}
254
254
```
255
-
If your API is issuing DPoP nonces to prevent replay attacks, you can pass the nonce value to the `getHeaderData()` method to include it in the DPoP proof. Use the `DPoPProvider.isNonceRequiredError(response: Response)` method to check if a particular API response failed because a nonce is required.
255
+
If your API is issuing DPoP nonces to prevent replay attacks, you can pass the nonce value to the `getHeaderData()` method to include it in the DPoP proof. Use the `DPoP.isNonceRequiredError(response: Response)` method to check if a particular API response failed because a nonce is required.
256
256
257
257
```kotlin
258
-
if (DPoPProvider.isNonceRequiredError(response)) {
258
+
if (DPoP.isNonceRequiredError(response)) {
259
259
val nonce = response.headers["DPoP-Nonce"]
260
260
val dpopProof =DPoPProvider.generateProof(
261
261
url, httpMethod, accessToken, nonce
@@ -264,7 +264,7 @@ if (DPoPProvider.isNonceRequiredError(response)) {
264
264
}
265
265
```
266
266
267
-
On logout, you should call `DPoPProvider.clearKeyPair()` to delete the user's key pair from the Keychain.
267
+
On logout, you should call `DPoP.clearKeyPair()` to delete the user's key pair from the Keychain.
268
268
269
269
```kotlin
270
270
WebAuthProvider.logout(account)
@@ -728,10 +728,10 @@ authentication
728
728
> [!NOTE]
729
729
> This feature is currently available in [Early Access](https://auth0.com/docs/troubleshoot/product-lifecycle/product-release-stages#early-access). Please reach out to Auth0 support to get it enabled for your tenant.
730
730
731
-
[DPoP](https://www.rfc-editor.org/rfc/rfc9449.html) (Demonstrating Proof of Posession) is an application-level mechanism for sender-constraining OAuth 2.0 access and refresh tokens by proving that the app is in possession of a certain private key. You can enable it by calling the `useDPoP(context: Context)` method. This ensures that DPoP proofs are generated for requests made through the AuthenticationAPI client.
731
+
[DPoP](https://www.rfc-editor.org/rfc/rfc9449.html) (Demonstrating Proof of Posession) is an application-level mechanism for sender-constraining OAuth 2.0 access and refresh tokens by proving that the app is in possession of a certain private key. You can enable it by calling the `useDPoP()` method. This ensures that DPoP proofs are generated for requests made through the AuthenticationAPI client.
732
732
733
733
```kotlin
734
-
val client =AuthenticationAPIClient(account).useDPoP(context)
734
+
val client =AuthenticationAPIClient(account).useDPoP()
735
735
```
736
736
737
737
[!IMPORTANT]
@@ -744,7 +744,7 @@ When making requests to your own APIs, use the `DPoP.getHeaderData()` method to
744
744
```kotlin
745
745
val url ="https://example.com/api/endpoint"
746
746
val httpMethod ="GET"
747
-
val headerData =DPoPProvider.getHeaderData(
747
+
val headerData =DPoP.getHeaderData(
748
748
httpMethod, url,
749
749
accessToken, tokenType
750
750
)
@@ -755,10 +755,10 @@ httpRequest.apply{
755
755
}
756
756
}
757
757
```
758
-
If your API is issuing DPoP nonces to prevent replay attacks, you can pass the nonce value to the `getHeaderData()` method to include it in the DPoP proof. Use the `DPoPProvider.isNonceRequiredError(response: Response)` method to check if a particular API response failed because a nonce is required.
758
+
If your API is issuing DPoP nonces to prevent replay attacks, you can pass the nonce value to the `getHeaderData()` method to include it in the DPoP proof. Use the `DPoP.isNonceRequiredError(response: Response)` method to check if a particular API response failed because a nonce is required.
759
759
760
760
```kotlin
761
-
if (DPoPProvider.isNonceRequiredError(response)) {
761
+
if (DPoP.isNonceRequiredError(response)) {
762
762
val nonce = response.headers["DPoP-Nonce"]
763
763
val dpopProof =DPoPProvider.generateProof(
764
764
url, httpMethod, accessToken, nonce
@@ -767,11 +767,11 @@ if (DPoPProvider.isNonceRequiredError(response)) {
767
767
}
768
768
```
769
769
770
-
On logout, you should call `DPoPProvider.clearKeyPair()` to delete the user's key pair from the Keychain.
770
+
On logout, you should call `DPoP.clearKeyPair()` to delete the user's key pair from the Keychain.
0 commit comments