the code:
security = Security()
token = UsernameToken('b77a5c561934e089', 'kmfHkNZyn1U/pGAiY3+h0BoHdKI=')
security.tokens.append(token)
client.set_options(wsse=security)
My problem is this: when I turn on the UsernameToken, I get this header:
<SOAP-ENV:Header>
<wsse:Security mustUnderstand="true">
<wsse:UsernameToken>
<wsse:Username>b77a5c561934e089</wsse:Username>
<wsse:Password>kmfHkNZyn1U/pGAiY3+h0BoHdKI=</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
But I need an answer to this requirement in a web service:
<sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssUsernameToken10 />
</wsp:Policy>
</sp:UsernameToken>
</wsp:Policy>
</sp:SignedSupportingTokens>
How can I do this with foam? I searched the entire Internet, but could not find a solution.
source
share