Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ovnicraft/69dccd4aaf8de09dac91071a3305a28d to your computer and use it in GitHub Desktop.
Save ovnicraft/69dccd4aaf8de09dac91071a3305a28d to your computer and use it in GitHub Desktop.
from suds.wsse import Security, UsernameToken, Timestamp
security = Security()
token = UsernameToken(CEDULA)
token.setcreated(response.Fecha)
token.nonce_has_encoding = True
token.setnonce(response.Nonce)
token.setpassworddigest(response.Digest)
security.tokens.append(token)
token_ts = Timestamp()
token_ts.created = response.Fecha
token_ts.expires = response.FechaF
security.tokens.append(token_ts)
client.set_options(wsse=security)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment