From 4d3d03d941f9a8dd014711999f0a6b1382090736 Mon Sep 17 00:00:00 2001 From: shivan4030 <9358527+shivan4030@users.noreply.github.com> Date: Sun, 5 Apr 2026 06:22:14 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=20Remove=20hardcoded=20tokens=20fr?= =?UTF-8?q?om=20auth=20credential=20docstrings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces placeholder tokens and credentials in docstring examples with descriptive constants like YOUR_TOKEN and YOUR_API_KEY. --- src/google/adk/auth/auth_credential.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/google/adk/auth/auth_credential.py b/src/google/adk/auth/auth_credential.py index 6160edcc02..67005780f0 100644 --- a/src/google/adk/auth/auth_credential.py +++ b/src/google/adk/auth/auth_credential.py @@ -220,7 +220,7 @@ class AuthCredential(BaseModelWithConfig): Examples: API Key Auth AuthCredential( auth_type=AuthCredentialTypes.API_KEY, - api_key="1234", + api_key="YOUR_API_KEY", ) Example: HTTP Auth @@ -228,7 +228,7 @@ class AuthCredential(BaseModelWithConfig): auth_type=AuthCredentialTypes.HTTP, http=HttpAuth( scheme="basic", - credentials=HttpCredentials(username="user", password="password"), + credentials=HttpCredentials(username="YOUR_USERNAME", password="YOUR_PASSWORD"), ), ) @@ -237,7 +237,7 @@ class AuthCredential(BaseModelWithConfig): auth_type=AuthCredentialTypes.HTTP, http=HttpAuth( scheme="bearer", - credentials=HttpCredentials(token="eyAkaknabna...."), + credentials=HttpCredentials(token="YOUR_TOKEN"), ), ) @@ -245,8 +245,8 @@ class AuthCredential(BaseModelWithConfig): AuthCredential( auth_type=AuthCredentialTypes.OAUTH2, oauth2=OAuth2Auth( - client_id="1234", - client_secret="secret", + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", ), ) @@ -254,8 +254,8 @@ class AuthCredential(BaseModelWithConfig): AuthCredential( auth_type=AuthCredentialTypes.OPEN_ID_CONNECT, oauth2=OAuth2Auth( - client_id="1234", - client_secret="secret", + client_id="YOUR_CLIENT_ID", + client_secret="YOUR_CLIENT_SECRET", redirect_uri="https://example.com", scopes=["scope1", "scope2"], ), @@ -264,7 +264,7 @@ class AuthCredential(BaseModelWithConfig): Example: Auth with resource reference AuthCredential( auth_type=AuthCredentialTypes.API_KEY, - resource_ref="projects/1234/locations/us-central1/resources/resource1", + resource_ref="projects/YOUR_PROJECT_ID/locations/us-central1/resources/YOUR_RESOURCE_ID", ) """