def service_account_dict_to_scheme_credential(
    config: Dict[str, Any],
    scopes: List[str],
) -> Tuple[AuthScheme, AuthCredential]:
  """Creates AuthScheme and AuthCredential for Google Service Account.

  Returns a bearer token scheme, and a service account credential.

  Args:
      config: A ServiceAccount object containing the Google Service Account
        configuration.
      scopes: A list of scopes to be used.

  Returns:
      Tuple: (AuthScheme, AuthCredential)
  """
  auth_scheme = HTTPBearer(bearerFormat="JWT")
  service_account = ServiceAccount(
      service_account_credential=ServiceAccountCredential.model_construct(
          **config
      ),
      scopes=scopes,
  )
  auth_credential = AuthCredential(
      auth_type=AuthCredentialTypes.SERVICE_ACCOUNT,
      service_account=service_account,
  )
  return auth_scheme, auth_credential
Creates AuthScheme and AuthCredential for Google Service Account.

  Returns a bearer token scheme, and a service account credential.

  Args:
      config: A ServiceAccount object containing the Google Service Account
        configuration.
      scopes: A list of scopes to be used.

  Returns:
      Tuple: (AuthScheme, AuthCredential)
  
src/google/adk/tools/openapi_tool/auth/auth_helpers.py