Package suds :: Module wsse :: Class UsernameToken
[hide private]
[frames] | no frames]

Class UsernameToken

source code

sudsobject.Object --+    
                    |    
                Token --+
                        |
                       UsernameToken

Represents a basic UsernameToken WS-Secuirty token.

Instance Methods [hide private]
 
__init__(self, username=None, password=None) source code
 
setnonce(self, text=None)
Set nonce which is arbitraty set of bytes to prevent reply attacks.
source code
 
setcreated(self, dt=None)
Set created.
source code
Element
xml(self)
Get xml representation of the object.
source code

Inherited from sudsobject.Object: __contains__, __delattr__, __getitem__, __iter__, __len__, __repr__, __setattr__, __setitem__, __str__, __unicode__

Class Methods [hide private]

Inherited from Token: now, sysdate, utc

Instance Variables [hide private]
datetime created
The token created.
str nonce
A set of bytes to prevent reply attacks.
str password
A password.
str username
A username.
Method Details [hide private]

__init__(self, username=None, password=None)
(Constructor)

source code 
Parameters:
  • username (str) - A username.
  • password (str) - A password.
Overrides: sudsobject.Object.__init__

setnonce(self, text=None)

source code 

Set nonce which is arbitraty set of bytes to prevent reply attacks.

Parameters:
  • text (str) - The nonce text value. Generated when None.

setcreated(self, dt=None)

source code 

Set created.

Parameters:
  • dt (datetime) - The created date & time. Set as datetime.utc() when None.

xml(self)

source code 

Get xml representation of the object.

Returns: Element
The root node.