Skip to content

Commit cafb14a

Browse files
committed
Document low-level credentials methods
This commit fills in missing documentation for low-level credentials methods. Part of #9
1 parent 01eca6b commit cafb14a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

gssapi/raw/creds.pyx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,25 @@ def release_cred(Creds creds not None):
174174

175175
def inquire_cred(Creds creds not None, name=True, ttl=True,
176176
usage=True, mechs=True):
177+
"""Inspect credentials for information
178+
179+
This method inspects a :class:`Creds` object for information.
180+
181+
Args:
182+
creds (Creds): the credentials to inspect
183+
name (bool): get the Name associated with the credentials
184+
ttl (bool): get the TTL for the credentials
185+
usage (bool): get the usage type of the credentials
186+
mechs (bool): the mechanims used with the credentials
187+
188+
Returns:
189+
InquireCredResult: the information about the credentials,
190+
with unused fields set to None
191+
192+
Raises:
193+
GSSError
194+
"""
195+
177196
# TODO(directxman12): add docs
178197
cdef gss_name_t res_name
179198
cdef gss_name_t *res_name_ptr = NULL
@@ -232,6 +251,27 @@ def inquire_cred(Creds creds not None, name=True, ttl=True,
232251
def inquire_cred_by_mech(Creds creds not None, OID mech not None,
233252
name=True, initiator_ttl=True,
234253
acceptor_ttl=True, usage=True):
254+
"""Inspect credentials for mechanism-specific
255+
256+
This method inspects a :class:`Creds` object for information
257+
specific to a particular mechanism.
258+
259+
Args:
260+
creds (Creds): the credentials to inspect
261+
mech (OID): the desired mechanism
262+
name (bool): get the Name associated with the credentials
263+
initiator_ttl (bool): get the initiator TTL for the credentials
264+
acceprot_ttl (bool): get the acceptor TTL for the credentials
265+
usage (bool): get the usage type of the credentials
266+
267+
Returns:
268+
InquireCredByMechResult: the information about the credentials,
269+
with unused fields set to None
270+
271+
Raises:
272+
GSSError
273+
"""
274+
235275
# TODO(directxman12): add docs
236276
cdef gss_name_t res_name
237277
cdef gss_name_t *res_name_ptr = NULL

0 commit comments

Comments
 (0)