AuthConfig
What a tool needs to authenticate to a service: the scheme the service expects, and the tool's credentials. Creating a config or reading its properties requires @OptIn(ExperimentalAuthApi::class); holding one, as EventActions does, does not.
Throws
if credentialKey is empty.
Constructors
Types
Fluent builder for AuthConfig, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.
Properties
How the service expects the tool to authenticate.
The key under which ADK stores and looks up exchangedAuthCredential; configs with the same key share it. Defaults to a key derived from authScheme and rawAuthCredential, computed once, so copy keeps it. toString redacts it.
The credential obtained when the tool has none it can use as is. The app sets it, such as with an API key the user enters; for OAuth2 and OpenID Connect, ADK first sets the authorization URL and state, and the app then adds the sign-in result.
The credential the tool is configured with: one it uses as is, such as an API key, or one it signs in with, such as an OAuth2 client ID and secret.
Functions
Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.