mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
Implement email blur
Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
parent
b048c91620
commit
2135172aa9
3 changed files with 46 additions and 3 deletions
|
|
@ -11,7 +11,8 @@
|
|||
"pagerfanta/pagerfanta": "^3.6",
|
||||
"smalot/pdfparser": "^2.4",
|
||||
"symfony/console": "^5.4",
|
||||
"tecnickcom/tcpdf": "^6.4"
|
||||
"tecnickcom/tcpdf": "^6.4",
|
||||
"wobeto/email-blur": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8",
|
||||
|
|
|
|||
42
composer.lock
generated
42
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "9a4964d68f929a2d16fe32025a170fc5",
|
||||
"content-hash": "e680dc2da1aee7d230b344aa0367ca37",
|
||||
"packages": [
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
|
|
@ -1650,6 +1650,46 @@
|
|||
}
|
||||
],
|
||||
"time": "2023-09-06T15:09:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "wobeto/email-blur",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fernandowobeto/email-blur.git",
|
||||
"reference": "8b5dde08cad6655eeadb982fed3619d72cbc809d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fernandowobeto/email-blur/zipball/8b5dde08cad6655eeadb982fed3619d72cbc809d",
|
||||
"reference": "8b5dde08cad6655eeadb982fed3619d72cbc809d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Wobeto\\EmailBlur\\": "Wobeto/EmailBlur/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fernando WObeto",
|
||||
"email": "fernandowobeto@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A library to e-mail blur",
|
||||
"support": {
|
||||
"issues": "https://github.com/fernandowobeto/email-blur/issues",
|
||||
"source": "https://github.com/fernandowobeto/email-blur/tree/1.0.0"
|
||||
},
|
||||
"time": "2021-06-05T01:11:18+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ use OCP\IConfig;
|
|||
use OCP\IL10N;
|
||||
use OCP\IUser;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Wobeto\EmailBlur\Blur;
|
||||
|
||||
abstract class AbstractIdentifyMethod implements IIdentifyMethod {
|
||||
protected IdentifyMethod $entity;
|
||||
|
|
@ -167,6 +168,7 @@ abstract class AbstractIdentifyMethod implements IIdentifyMethod {
|
|||
]);
|
||||
if ($lastActionDate + $renewalInterval < $now) {
|
||||
$this->logger->debug('AbstractIdentifyMethod::throwIfRenewalIntervalExpired Exception');
|
||||
$blur = new Blur($this->getEntity()->getIdentifierValue());
|
||||
throw new LibresignException(json_encode([
|
||||
'action' => JSActions::ACTION_RENEW_EMAIL,
|
||||
// TRANSLATORS title that is displayed at screen to notify the signer that the link to sign the document expired
|
||||
|
|
@ -176,7 +178,7 @@ abstract class AbstractIdentifyMethod implements IIdentifyMethod {
|
|||
We will send a new link to the email %1$s.
|
||||
Click below to receive the new link and be able to sign the document.
|
||||
BODY,
|
||||
[$this->getEntity()->getIdentifierValue()]
|
||||
[$blur->make()]
|
||||
),
|
||||
'uuid' => $signRequest->getUuid(),
|
||||
// TRANSLATORS Button to renew the link to sign the document. Renew is the action to generate a new sign link when the link expired.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue