Password encryption, Claim groups
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using FoodsharingSiegen.Shared.Helper;
|
||||
using FoodsharingSiegen.Contracts.Helper;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
@@ -33,8 +33,8 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
[NotMapped]
|
||||
public string Password
|
||||
{
|
||||
get => AuthHelper.TryDecrypt(EncryptedPassword, out var password) ? password : string.Empty;
|
||||
set => EncryptedPassword = AuthHelper.Encrypt(value);
|
||||
get => Cryptor.TryDecrypt(EncryptedPassword, out var password) ? password : string.Empty;
|
||||
set => EncryptedPassword = Cryptor.Encrypt(value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user