Closed cmjunior closed 2 years ago
Hello @cmjunior. Do you mean callbacks from peculiar-fortify-certificates
web-component?
@donskov exactly, these one here from example, not being called:
var fortifyCertificates = document.createElement('peculiar-fortify-certificates');
// All possible propertiest you can find on the documentation page
// https://fortifyapp.com/docs/webcomponents/fortify-certificates/readme#properties
fortifyCertificates.debug = true;
fortifyCertificates.filters = {
// onlySmartcards: false,
// expired: false,
onlyWithPrivateKey: true,
// subjectDNMatch: 'apple',
// subjectDNMatch: new RegExp(/apple/),
// issuerDNMatch: 'demo',
// issuerDNMatch: new RegExp(/demo/),
// providerNameMatch: 'MacOS',
// providerNameMatch: new RegExp(/MacOS/),
// keyUsage: ['digitalSignature'],
// certificateIdMatch: 'test',
};
fortifyCertificates.addEventListener('selectionCancel', function() {
alert('selectionCancel');
});
fortifyCertificates.addEventListener('selectionSuccess', continueHandler);
document.getElementsByTagName('section')[0].prepend(fortifyCertificates);
@cmjunior We released a 2.x
version of Fortify web components.
Breaking changes:
Please check the event names again. Examples work for me without errors.
@donskov that was it! I was using the old ones. Thanks a lot!
After a while working fine, fortify stopped call the registered callback functions. I'm already tried on examples provided, so nothing happens when I click on "Cancel" or "Continue" buttons.
It's a windows environment. Nothing on browser's console either.
The error I'd noticed on logs was:
{"source":"server","error":"CKR_USER_TYPE_INVALID","level":"error","message":"Server event error","timestamp":"2022-06-06T14:38:54.103Z"}
One thing I've noticed is that the token's passwords is called a few times, when the fortify component is mounted, about three times, sometimes two.