Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/google/adk/auth/auth_credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ class AuthCredential(BaseModelWithConfig):
Examples: API Key Auth
AuthCredential(
auth_type=AuthCredentialTypes.API_KEY,
api_key="1234",
api_key="YOUR_API_KEY",
)

Example: HTTP Auth
AuthCredential(
auth_type=AuthCredentialTypes.HTTP,
http=HttpAuth(
scheme="basic",
credentials=HttpCredentials(username="user", password="password"),
credentials=HttpCredentials(username="YOUR_USERNAME", password="YOUR_PASSWORD"),
),
)

Expand All @@ -237,25 +237,25 @@ class AuthCredential(BaseModelWithConfig):
auth_type=AuthCredentialTypes.HTTP,
http=HttpAuth(
scheme="bearer",
credentials=HttpCredentials(token="eyAkaknabna...."),
credentials=HttpCredentials(token="YOUR_TOKEN"),
),
)

Example: OAuth2 Auth with Authorization Code Flow
AuthCredential(
auth_type=AuthCredentialTypes.OAUTH2,
oauth2=OAuth2Auth(
client_id="1234",
client_secret="secret",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
),
)

Example: OpenID Connect Auth
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"],
),
Expand Down