Skip to content

Scheme

autogen.beta.a2a.security.Scheme dataclass #

Scheme(name, scheme, scopes=())

A named security scheme: binds a card-level identifier to a proto scheme and optional OAuth2/OIDC scopes. Use the *_scheme(name=...) factories below to construct one; pass Scheme objects to require(...) to build a :class:Requirement. with_scopes(...) returns a copy with the given scopes attached.

name instance-attribute #

name

scheme instance-attribute #

scheme

scopes class-attribute instance-attribute #

scopes = ()

with_scopes #

with_scopes(*scopes)

Return a copy of this scheme with the given OAuth2/OIDC scopes.

Source code in autogen/beta/a2a/security.py
def with_scopes(self, *scopes: str) -> "Scheme":
    """Return a copy of this scheme with the given OAuth2/OIDC scopes."""
    return replace(self, scopes=scopes)