robrichards / wse-php

Libraries for adding WS-* support to ext/soap in PHP
129 stars 92 forks source link

No way to get thumbprint from WSSESoapServer, no example usage #49

Open aoxborrow opened 5 years ago

aoxborrow commented 5 years ago

The WSSESoapServer class lets you validate WSS Soap, (thank you!), but you can't get access to the certificate/key/thumbprint. The class is simple enough to extend and modify, but an easy fix would be to store $objKey as an instance property so we can do:

$server = new WSSESoapServer($xml);
if ($server->verify()) {
    $thumbprint = $server->objKey->getX509Thumbprint();
}

Also, adding an example along with the others would be nice. I can do a pull request if you'd like.