codekingpro/portable-devtools
114k
1import typing as t2 3if t.TYPE_CHECKING:4 from gssapi.raw.named_tuples import InquireAttrsResult, DisplayAttrResult5 from gssapi.raw.oids import OID6 7 8def indicate_mechs_by_attrs(9 desired_mech_attrs: t.Optional[t.Iterable["OID"]] = None,10 except_mech_attrs: t.Optional[t.Iterable["OID"]] = None,11 critical_mech_attrs: t.Optional[t.Iterable["OID"]] = None,12) -> t.Set["OID"]:13 """Get a set of mechanisms that have the specified attributes.14 15 Args:16 desired_mech_attrs (~gssapi.OID): Attributes that the output mechs MUST17 offer18 except_mech_attrs (~gssapi.OID): Attributes that the output mechs MUST19 NOT offer20 critical_mech_attrs (~gssapi.OID): Attributes that the output mechs21 MUST understand and offer22 23 Returns:24 ~gssapi.MechType: a set of mechs which satisfy the given criteria25 26 Raises:27 ~gssapi.exceptions.GSSError28 """29 30 31def inquire_attrs_for_mech(32 mech: "OID",33) -> "InquireAttrsResult":34 """Gets the set of attrs supported and known by a mechanism.35 36 Args:37 mech (~gssapi.raw.types.MechType): Mechanism to inquire about38 39 Returns:40 InquireAttrsResult: the results of inquiry; a mech's attributes and41 known attributes42 43 Raises:44 ~gssapi.exceptions.GSSError45 """46 47 48def display_mech_attr(49 attr: "OID",50) -> "DisplayAttrResult":51 """Returns information about attributes in human readable form.52 53 Args:54 attr (~gssapi.OID): Mechanism attribute to retrieve names and55 descriptions of56 57 Returns:58 DisplayAttrResult: the results of displaying the attribute; mech name,59 short description, and long description.60 61 Raises:62 ~gssapi.exceptions.GSSError63 """64 