From 0fe88bcdc135f48c885898f0f85eaf8fa0ca2853 Mon Sep 17 00:00:00 2001 From: Abiram Satkunaseelan Date: Wed, 25 Feb 2026 01:49:06 +0100 Subject: [PATCH] docs: add backward compatibility note for AuthenticateRequestOptions The current README reflects the newer SDK structure (security.types). Added a note to help users on v1.x and v2.x who still need to import from jwks_helpers, preventing a ModuleNotFoundError. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 405744e3..4593c4e3 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,16 @@ def is_signed_in(request: httpx.Request): If the request is correctly authenticated, the token's payload is made available in `request_state.payload`. Otherwise the reason for the token verification failure is given by `request_state.reason`. + +> [!NOTE] +> **Backward Compatibility:** If you are using an older version of the SDK (v1.x or v2.x), the `AuthenticateRequestOptions` class and the `authenticate_request` method are located in a different module. +> +> You should import them like this: +> ```python +> from clerk_backend_api.jwks_helpers import authenticate_request, AuthenticateRequestOptions +> ``` + + ### Authenticating Machine Tokens If you need to authenticate a machine token rather than a session token, this can be done using the `accepts_token` param as such: