Skip to main content

auth_metadata

This context manager allows you to pass contextualized auth metadata downstream to the Flyte authentication system.

This is only useful if flyte.init_passthrough() has been called.

Example:


flyte.init_passthrough("my-endpoint")

...

with auth_metadata((key1, value1), (key2, value2)):
...

Args: *kv: Tuple of auth metadata key/value pairs.

@contextmanager
def auth_metadata(*kv: Tuple[str, str]): ...

This context manager allows you to pass contextualized auth metadata downstream to the Flyte authentication system. This is only useful if flyte.init_passthrough() has been called.

Parameters​

NameTypeDescription
*kvTuple[str, str]Tuple of auth metadata key/value pairs.

Returns​

TypeDescription
Iterator[None]A context manager generator yielding control while setting the internal authentication metadata context.