aiowamp.TicketAuth

class aiowamp.TicketAuth(ticket)[source]

Auth method for ticket-based authentication.

With Ticket-based authentication, the client needs to present the server an authentication “ticket” - some magic value to authenticate itself to the server.

This “ticket” could be a long-lived, pre-agreed secret (e.g. a user password) or a short-lived authentication token (like a Kerberos token). WAMP does not care or interpret the ticket presented by the client.

Caution: This scheme is extremely simple and flexible, but the resulting security may be limited. E.g., the ticket value will be sent over the wire. If the transport WAMP is running over is not encrypted, a man-in-the-middle can sniff and possibly hijack the ticket. If the ticket value is reused, that might enable replay attacks.
Parameters:ticket (str) –
__init__(ticket)[source]

Initialize self. See help(type(self)) for accurate signature.

Parameters:ticket (str) –
Return type:None

Methods

__init__(ticket) Initialize self.
authenticate(challenge) Generate an authenticate message for the challenge.
check_welcome(welcome) Check the welcome message sent by the router.

Attributes

auth_extra Additional auth extras that need to be passed along.
method_name
requires_auth_id Whether the auth method requires auth_id to be set.
__init__(ticket)[source]

Initialize self. See help(type(self)) for accurate signature.

Parameters:ticket (str) –
Return type:None
authenticate(challenge)[source]

Generate an authenticate message for the challenge.

Parameters:challenge (Challenge) – Challenge message to respond to.
Return type:Authenticate
Returns:Either an authenticate message to send to the router or an abort message to indicate that the attempt should be aborted.
Raises:Exception – When something goes wrong during authentication. Should be interpreted the same as an abort message.
requires_auth_id

Whether the auth method requires auth_id to be set.

Return type:bool
auth_extra

Additional auth extras that need to be passed along.

None indicates that no extras need to be passed.

Return type:None