summaryrefslogtreecommitdiff
path: root/paramiko/ssh_gss.py
diff options
context:
space:
mode:
authorAnselm Kruis <a.kruis@science-computing.de>2018-02-09 23:48:47 +0100
committerTanja Huthmacher <tanja.huthmacher@atos.net>2018-09-19 11:11:45 +0200
commitdb358dc149f7549c147e520bbe5c26b571d899d4 (patch)
treecaea55628e71ae3f4f6cfad816119aef3c0c47cc /paramiko/ssh_gss.py
parenta20936e18c0336476f8f4976257699a52e9a996e (diff)
downloadparamiko-db358dc149f7549c147e520bbe5c26b571d899d4.tar.gz
Fix Sphinx and PEP 8 warnings
Diffstat (limited to 'paramiko/ssh_gss.py')
-rw-r--r--paramiko/ssh_gss.py33
1 files changed, 15 insertions, 18 deletions
diff --git a/paramiko/ssh_gss.py b/paramiko/ssh_gss.py
index 4c245471..ff2fa065 100644
--- a/paramiko/ssh_gss.py
+++ b/paramiko/ssh_gss.py
@@ -86,14 +86,14 @@ def GSSAuth(auth_method, gss_deleg_creds=True):
We delegate credentials by default.
:return: Either an `._SSH_GSSAPI_OLD` or `._SSH_GSSAPI_NEW` (Unix)
object or an `_SSH_SSPI` (Windows) object
- :rtype: Object
+ :rtype: object
:raises: ``ImportError`` -- If no GSS-API / SSPI module could be imported.
:see: `RFC 4462 <http://www.ietf.org/rfc/rfc4462.txt>`_
:note: Check for the available API and return either an `._SSH_GSSAPI_OLD`
- (MIT GSSAPI using python-gssapi package) object, an `._SSH_GSSAPI_NEW`
- (MIT GSSAPI using gssapi package) object
+ (MIT GSSAPI using python-gssapi package) object, an
+ `._SSH_GSSAPI_NEW` (MIT GSSAPI using gssapi package) object
or an `._SSH_SSPI` (MS SSPI) object.
If there is no supported API available,
``None`` will be returned.
@@ -110,8 +110,8 @@ def GSSAuth(auth_method, gss_deleg_creds=True):
class _SSH_GSSAuth(object):
"""
- Contains the shared variables and methods of `._SSH_GSSAPI_*` and
- `._SSH_SSPI`.
+ Contains the shared variables and methods of `._SSH_GSSAPI_OLD`,
+ `._SSH_GSSAPI_NEW` and `._SSH_SSPI`.
"""
def __init__(self, auth_method, gss_deleg_creds):
@@ -451,13 +451,12 @@ class _SSH_GSSAPI_NEW(_SSH_GSSAuth):
("pseudo negotiated" mechanism, because we
support just the krb5 mechanism :-))
:param str recv_token: The GSS-API token received from the Server
- :raise SSHException: Is raised if the desired mechanism of the client
- is not supported
- :raise gssapi.exceptions.GSSError: if there is an error signaled by the
- GSS-API implementation
- :return: A ``String`` if the GSS-API has returned a token or ``None`` if
- no token was returned
- :rtype: String or None
+ :raises: `.SSHException` -- Is raised if the desired mechanism of the
+ client is not supported
+ :raises: ``gssapi.exceptions.GSSError`` if there is an error signaled
+ by the GSS-API implementation
+ :return: A ``String`` if the GSS-API has returned a token or ``None``
+ if no token was returned
"""
self._username = username
self._gss_host = target
@@ -492,8 +491,7 @@ class _SSH_GSSAPI_NEW(_SSH_GSSAuth):
gssapi-keyex:
Returns the MIC token from GSS-API with the SSH session ID as
message.
- :rtype: String
- :see: `._ssh_build_mic`
+ :rtype: str
"""
self._session_id = session_id
if not gss_kex:
@@ -517,7 +515,6 @@ class _SSH_GSSAPI_NEW(_SSH_GSSAuth):
if it's not the initial call.
:return: A ``String`` if the GSS-API has returned a token or ``None``
if no token was returned
- :rtype: String or None
"""
# hostname and username are not required for GSSAPI, but for SSPI
self._gss_host = hostname
@@ -536,7 +533,7 @@ class _SSH_GSSAPI_NEW(_SSH_GSSAuth):
:param str session_id: The SSH session ID
:param str username: The name of the user who attempts to login
:return: None if the MIC check was successful
- :raises gssapi.exceptions.GSSError: if the MIC check failed
+ :raises: ``gssapi.exceptions.GSSError`` -- if the MIC check failed
"""
self._session_id = session_id
self._username = username
@@ -572,8 +569,8 @@ class _SSH_GSSAPI_NEW(_SSH_GSSAuth):
(server mode).
:param str client_token: The GSS-API token received form the client
- :raise NotImplementedError: Credential delegation is currently not
- supported in server mode
+ :raises: ``NotImplementedError`` -- Credential delegation is currently
+ not supported in server mode
"""
raise NotImplementedError