class GatekeeperSocket(socket.socket):
'''
This represents a socket with the ability to authenticate to a service running behind socket-gatekeeperd.
Call either "doAuthentication" or "doAuthenticationFromInput" after calling 'connect'. This will perform the handshake necessary to continue the connection.
After authenticated, use like a normal socket object.
'''
.....
def doAuthentication(self, password):
'''
doAuthentication - Performs the authentication with given password. This is not very secure, don't use plaintext passwords.
'''
.....
def doAuthenticationFromInput(self):
'''
doAuthenticationFromInput - Prompts tty for password and then performs the gatekeeper handshake.
'''
......