mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-05-31 15:25:39 +02:00
Add (inactive) encryption on 2FAccount controller
This commit is contained in:
parent
7fca9cdf3c
commit
c044dcd6c6
@ -4,6 +4,7 @@ namespace App;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
|
|
||||||
class TwoFAccount extends Model
|
class TwoFAccount extends Model
|
||||||
{
|
{
|
||||||
@ -40,4 +41,35 @@ class TwoFAccount extends Model
|
|||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the user's first name.
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
// public function setUriAttribute($value)
|
||||||
|
// {
|
||||||
|
// $this->attributes['uri'] = encrypt($value);
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the user's first name.
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
// public function getUriAttribute($value)
|
||||||
|
// {
|
||||||
|
// try {
|
||||||
|
|
||||||
|
// return decrypt($value);
|
||||||
|
|
||||||
|
// } catch (DecryptException $e) {
|
||||||
|
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ return [
|
|||||||
'response' => [
|
'response' => [
|
||||||
'no_valid_totp' => 'No valid TOTP resource in this QR code',
|
'no_valid_totp' => 'No valid TOTP resource in this QR code',
|
||||||
],
|
],
|
||||||
'something_wrong_with_server' => 'Something is wrong with your server'
|
'something_wrong_with_server' => 'Something is wrong with your server',,
|
||||||
|
'Unable_to_decrypt_uri' => 'Unable to decrypt uri',
|
||||||
|
|
||||||
];
|
];
|
Loading…
x
Reference in New Issue
Block a user