Skip to content

Conversation

@mateusz-sawit
Copy link

To attach reference to an Issuer and Serial Number instead of reference to a Binary Security Token you need to call
$objWSSE->attachX509DatatoSig($options)
instead of
$token = $objWSSE->addBinaryToken(file_get_contents(PUBLIC_KEY));
$objWSSE->attachTokentoSig($token);

The options should be an array:
[
'KeyInfo' => [
'X509Data' => [
'IssuerName' => "The issuer name from cert",
'SerialNumber' => "Cert serial number"
]
]
]

@mateusz-sawit mateusz-sawit changed the title Issuer name, serial number Implementation for signature X.509 Issuer name, serial number Implementation for signature X.509. Refs #20 Jul 24, 2017
Mateusz added 3 commits July 24, 2017 10:54
This reverts commit f0e43fc.
This reverts commit f11b9a7.
This reverts commit 6bedc51.
@robrichards
Copy link
Owner

I'd actually look at implementing this within the context of the attachTokentoSig() method as the SecurityTokenReference can contain one of 3 token types and this method name is generic with respect to token type. An optional parameter to specify the token type with the default being binary security token to maintain BC. Should also be simple this way to add the KeyIdentifier type too.

@mateusz-sawit
Copy link
Author

mateusz-sawit commented Aug 8, 2017

You can make my function private and call it from attachTokentoSig in case of the optional parameter points to use this token data type - the only thing is that there must not be a binary token in request so the $token parameter will be null
So you actually do not attach the Token but the token data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants