MCPcopy Create free account
hub / github.com/google/adk-python / _normalize_oauth_scopes

Function _normalize_oauth_scopes

src/google/adk/auth/auth_handler.py:39–47  ·  view source on GitHub ↗

Normalize OAuth scopes into the list shape expected by authlib.

(
    scopes: dict[str, str] | list[str] | None,
)

Source from the content-addressed store, hash-verified

37
38
39def _normalize_oauth_scopes(
40 scopes: dict[str, str] | list[str] | None,
41) -> list[str]:
42 """Normalize OAuth scopes into the list shape expected by authlib."""
43 if not scopes:
44 return []
45 if isinstance(scopes, dict):
46 return list(scopes.keys())
47 return list(scopes)
48
49
50class AuthHandler:

Callers 1

generate_auth_uriMethod · 0.85

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected