Skip to content

Commit

Permalink
Merge pull request #30 from bmsiegel/BinarySecurityToken_NS_Fix
Browse files Browse the repository at this point in the history
Fix WSTEP BinarySecurityToken attribute namespaces
  • Loading branch information
dmulder committed Feb 15, 2023
2 parents 86bc2bb + cb7a9ca commit 2135199
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cepces/wstep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
NS_WST = 'http://docs.oasis-open.org/ws-sx/ws-trust/200512'
NS_WST_SECEXT = 'http://docs.oasis-open.org/wss/2004/01/' \
'oasis-200401-wss-wssecurity-secext-1.0.xsd'
NS_WST_UTILITY = 'http://docs.oasis-open.org/wss/2004/01/' \
'oasis-200401-wss-wssecurity-utility-1.0.xsd'
NS_ENROLLMENT = 'http://schemas.microsoft.com/windows/pki/2009/01/enrollment'

TOKEN_TYPE = 'http://docs.oasis-open.org/wss/2004/01/' \
Expand Down
8 changes: 4 additions & 4 deletions cepces/wstep/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"""WSTEP Types."""
from xml.etree.ElementTree import Element, QName
from cepces.soap import NS_ADDRESSING
from cepces.wstep import NS_WST, NS_WST_SECEXT, NS_ENROLLMENT
from cepces.wstep import NS_WST, NS_WST_SECEXT, NS_WST_UTILITY, NS_ENROLLMENT
from cepces.wstep import TOKEN_TYPE, VALUE_TYPE, ENCODING_TYPE
from cepces.wstep import ISSUE_REQUEST_TYPE
from cepces.xml.binding import XMLAttribute
Expand Down Expand Up @@ -61,9 +61,9 @@ def create():
element.append(request_type)

token = Element(QName(NS_WST_SECEXT, 'BinarySecurityToken'))
token.set(QName(NS_WST_SECEXT, 'ValueType'), VALUE_TYPE)
token.set(QName(NS_WST_SECEXT, 'EncodingType'), ENCODING_TYPE)
token.set(QName(NS_ADDRESSING, 'Id'), '')
token.set(QName('ValueType'), VALUE_TYPE)
token.set(QName('EncodingType'), ENCODING_TYPE)
token.set(QName(NS_WST_UTILITY, 'Id'), '')
element.append(token)

return element
Expand Down

0 comments on commit 2135199

Please sign in to comment.