Tezos plugin for CakePHP
This plugin provides:
- Authenticator and Identifier for the Authentication plugin.
- Wallet connection via SIWT.
Install with :
composer require ziwot/cake-tezosLoad the plugin :
bin/cake plugin load CakeTezosLink assets :
cake plugin assets symlinkYou should also add it to your .gitignore :
# Plugins
/webroot/cake_tezos
Of course, when you deploy to prod, then, copy the assets :
cake plugin assets copyLoad Authenticator and Identifier :
// Load Authenticator & Identifier
$service->loadAuthenticator('CakeTezos.SignedMessage', [
'identifier' => 'CakeTezos.TezosBase',
]);In a view, load the element to allow connect :
<?= $this->element('CakeTezos.connect') ?>The statement is configurable :
<?= $this->element('CakeTezos.connect', ['statement' => 'I accept the conditions']) ?>