You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+37-7Lines changed: 37 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# GDPR compliant data portability with ease
2
2
3
-
This package helps you to be compliant with the GDPR article 20.
3
+
This package helps you to be compliant with the GDPR (article 20).
4
4
5
5
## Requirements
6
6
@@ -57,7 +57,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
57
57
class User extends Authenticatable
58
58
{
59
59
use Portable, Notifiable;
60
-
60
+
61
61
/**
62
62
* Get the GDPR compliant data portability array for the model.
63
63
*
@@ -66,9 +66,9 @@ class User extends Authenticatable
66
66
public function toPortableArray()
67
67
{
68
68
$array = $this->toArray();
69
-
69
+
70
70
// Customize array...
71
-
71
+
72
72
return $array;
73
73
}
74
74
}
@@ -91,7 +91,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
91
91
class User extends Authenticatable
92
92
{
93
93
use Portable, Notifiable;
94
-
94
+
95
95
/**
96
96
* The relations to include in the downloadable data.
97
97
*
@@ -118,7 +118,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
118
118
class User extends Authenticatable
119
119
{
120
120
use Portable, Notifiable;
121
-
121
+
122
122
/**
123
123
* The attributes that should be hidden for the downloadable data.
124
124
*
@@ -143,7 +143,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
143
143
class User extends Authenticatable
144
144
{
145
145
use Portable, Notifiable;
146
-
146
+
147
147
/**
148
148
* The attributes that should be visible in the downloadable data.
149
149
*
@@ -158,6 +158,36 @@ class User extends Authenticatable
158
158
159
159
This package exposes an endpoint at `/gdpr/download`. Only authenticated users should be able to access the routes. Your application should make a POST call, containing the currently authenticated user's password, to this endpoint. The re-authentication is needed to prevent information leakage.
160
160
161
+
### Encryption
162
+
163
+
> Before using encryption, you must set a `key` option in your `config/app.php` configuration file. If this value is not properly set, all encrypted values will be insecure.
164
+
165
+
You may encrypt/decrypt attributes on the fly using the `Soved\Laravel\Gdpr\EncryptsAttributes` trait on any model. The trait expects the `$encrypted` property to be filled with attribute keys:
166
+
167
+
```php
168
+
<?php
169
+
170
+
namespace App;
171
+
172
+
use Soved\Laravel\Gdpr\Portable;
173
+
use Illuminate\Notifications\Notifiable;
174
+
use Soved\Laravel\Gdpr\EncryptsAttributes;
175
+
use Illuminate\Foundation\Auth\User as Authenticatable;
176
+
177
+
class User extends Authenticatable
178
+
{
179
+
use EncryptsAttributes, Portable, Notifiable;
180
+
181
+
/**
182
+
* The attributes that should be encrypted and decrypted on the fly.
183
+
*
184
+
* @var array
185
+
*/
186
+
protected $encrypted = ['ssnumber'];
187
+
}
188
+
189
+
```
190
+
161
191
## Security Vulnerabilities
162
192
163
193
If you discover a security vulnerability within this project, please send an e-mail to Sander de Vos via [sander@tutanota.de](mailto:sander@tutanota.de). All security vulnerabilities will be promptly addressed.
0 commit comments