11from typing import Iterable , List , NamedTuple , Optional , Set , TYPE_CHECKING
22
33if TYPE_CHECKING :
4- from gssapi .raw .creds import Creds
5- from gssapi .raw .names import Name
6- from gssapi .raw .oids import OID
7- from gssapi .raw .sec_contexts import SecurityContext
8- from gssapi .raw .types import RequirementFlag
4+ import gssapi .raw as g
95
106
117class AcquireCredResult (NamedTuple ):
128 """Credential result when acquiring a GSSAPI credential."""
13- creds : "Creds" #: GSSAPI credentials that were acquired
14- mechs : Set ["OID" ] #: Set of mechs the cred is for
9+ creds : "g. Creds" #: GSSAPI credentials that were acquired
10+ mechs : Set ["g. OID" ] #: Set of mechs the cred is for
1511 lifetime : int #: Number of seconds for which the cred will remain valid
1612
1713
1814class InquireCredResult (NamedTuple ):
1915 """Information about the credential."""
20- name : Optional ["Name" ] #: The principal associated with the credential
16+ name : Optional ["g. Name" ] #: The principal associated with the credential
2117 lifetime : Optional [int ] #: Number of seconds which the cred is valid for
2218 usage : Optional [str ] #: How the credential can be used
23- mechs : Optional [Set ["OID" ]] #: Set of mechs the cred is for
19+ mechs : Optional [Set ["g. OID" ]] #: Set of mechs the cred is for
2420
2521
2622class InquireCredByMechResult (NamedTuple ):
2723 """Information about the credential for a specific mechanism."""
28- name : Optional ["Name" ] #: The principal associated with the credential
24+ name : Optional ["g. Name" ] #: The principal associated with the credential
2925 init_lifetime : Optional [int ] #: Time valid for initiation
3026 accept_lifetime : Optional [int ] #: Time valid for accepting
3127 usage : Optional [str ] #: How the credential can be used
3228
3329
3430class AddCredResult (NamedTuple ):
3531 """Result of adding to a GSSAPI credential."""
36- creds : Optional ["Creds" ] #: The credential that was generated
37- mechs : Set ["OID" ] #: Set of mechs the cred is for
32+ creds : Optional ["g. Creds" ] #: The credential that was generated
33+ mechs : Set ["g. OID" ] #: Set of mechs the cred is for
3834 init_lifetime : int #: Time valid for initiation
3935 accept_lifetime : int #: Time valid for accepting
4036
4137
4238class DisplayNameResult (NamedTuple ):
4339 """Textual representation of a GSSAPI name."""
4440 name : bytes #: The representation of the GSSAPI name
45- name_type : Optional ["OID" ] #: The type of GSSAPI name
41+ name_type : Optional ["g. OID" ] #: The type of GSSAPI name
4642
4743
4844class WrapResult (NamedTuple ):
@@ -60,40 +56,40 @@ class UnwrapResult(NamedTuple):
6056
6157class AcceptSecContextResult (NamedTuple ):
6258 """Result when accepting a security context by an initiator."""
63- context : "SecurityContext" #: The acceptor security context
64- initiator_name : "Name" #: The authenticated name of the initiator
65- mech : "OID" #: Mechanism with which the context was established
59+ context : "g. SecurityContext" #: The acceptor security context
60+ initiator_name : "g. Name" #: The authenticated name of the initiator
61+ mech : "g. OID" #: Mechanism with which the context was established
6662 token : Optional [bytes ] #: Token to be returned to the initiator
67- flags : "RequirementFlag " #: Services requested by the initiator
63+ flags : "g.equirementFlag " #: Services requested by the initiator
6864 lifetime : int #: Seconds for which the context is valid for
69- delegated_creds : Optional ["Creds" ] #: Delegated credentials
65+ delegated_creds : Optional ["g. Creds" ] #: Delegated credentials
7066 more_steps : bool #: More input is required to complete the exchange
7167
7268
7369class InitSecContextResult (NamedTuple ):
7470 """Result when initiating a security context"""
75- context : "SecurityContext" #: The initiator security context
76- mech : "OID" #: Mechanism used in the security context
77- flags : "RequirementFlag" #: Services available for the context
71+ context : "g. SecurityContext" #: The initiator security context
72+ mech : "g. OID" #: Mechanism used in the security context
73+ flags : "g. RequirementFlag" #: Services available for the context
7874 token : Optional [bytes ] #: Token to be sent to the acceptor
7975 lifetime : int #: Seconds for which the context is valid for
8076 more_steps : bool #: More input is required to complete the exchange
8177
8278
8379class InquireContextResult (NamedTuple ):
8480 """Information about the security context."""
85- initiator_name : Optional ["Name" ] #: Name of the initiator
86- target_name : Optional ["Name" ] #: Name of the acceptor
81+ initiator_name : Optional ["g. Name" ] #: Name of the initiator
82+ target_name : Optional ["g. Name" ] #: Name of the acceptor
8783 lifetime : Optional [int ] #: Time valid for the security context
88- mech : Optional ["OID" ] #: Mech used to create the security context
89- flags : Optional ["RequirementFlag" ] #: Services available for the context
84+ mech : Optional ["g. OID" ] #: Mech used to create the security context
85+ flags : Optional ["g. RequirementFlag" ] #: Services available for the context
9086 locally_init : Optional [bool ] #: Context was initiated locally
9187 complete : Optional [bool ] #: Context has been established and ready to use
9288
9389
9490class StoreCredResult (NamedTuple ):
9591 """Result of the credential storing operation."""
96- mechs : List ["OID" ] #: Mechs that were stored in the credential store
92+ mechs : List ["g. OID" ] #: Mechs that were stored in the credential store
9793 usage : str #: How the credential can be used
9894
9995
@@ -107,7 +103,7 @@ class InquireNameResult(NamedTuple):
107103 """Information about a GSSAPI Name."""
108104 attrs : List [bytes ] #: Set of attribute names
109105 is_mech_name : bool #: Name is a mechanism name
110- mech : "OID" #: The mechanism if is_name_mech is True
106+ mech : "g. OID" #: The mechanism if is_name_mech is True
111107
112108
113109class GetNameAttributeResult (NamedTuple ):
@@ -120,8 +116,8 @@ class GetNameAttributeResult(NamedTuple):
120116
121117class InquireAttrsResult (NamedTuple ):
122118 """Set of attributes supported and known by a mechanism."""
123- mech_attrs : Set ["OID" ] #: The mechanisms attributes
124- known_mech_attrs : Set ["OID" ] #: Known attributes of the mechanism
119+ mech_attrs : Set ["g. OID" ] #: The mechanisms attributes
120+ known_mech_attrs : Set ["g. OID" ] #: Known attributes of the mechanism
125121
126122
127123class DisplayAttrResult (NamedTuple ):
0 commit comments