pygamlastan.attribute_map

Convert between wire attribute names (OIDs/URNs) and friendly local names using the shipped maps. See the Attribute mapping guide.

pygamlastan.attribute_map.EPTID_OID: str

The OID name for eduPersonTargetedID.

class pygamlastan.attribute_map.AttributeConverterSet

A set of converters covering multiple name formats.

static with_default_maps(allow_unknown_attributes: bool = False) AttributeConverterSet

Preload all shipped default maps. With allow_unknown_attributes set, names that have no mapping pass through unchanged.

to_local(attributes: list[pygamlastan.core.Attribute]) list[LocalAttribute]
from_local(ava: list[LocalAttribute], name_format: str) list[pygamlastan.core.Attribute]
local_name(attribute: pygamlastan.core.Attribute) str | None
class pygamlastan.attribute_map.AttributeConverter(name_format: str)

A single-format converter.

static from_static(name: str) AttributeConverter

Build from a shipped map name: "saml_uri", "basic", "shibboleth_uri", "adfs_v1x" or "adfs_v20".

add_mapping(wire: str, local: str) None
to_local_name(wire_name: str) str | None
to_wire_name(local_name: str) str | None
name_format: str
class pygamlastan.attribute_map.LocalAttribute(name: str, values: list[str])

An attribute by its local name.

name: str
values: list[str]
pygamlastan.attribute_map.eptid_attribute(name_ids: list[pygamlastan.core.NameId]) pygamlastan.core.Attribute

Build an eduPersonTargetedID attribute from NameIDs.

pygamlastan.attribute_map.eptid_name_ids(attribute: pygamlastan.core.Attribute) list[pygamlastan.core.NameId]

Extract the NameIDs from an eduPersonTargetedID attribute.