Still working on getting client credential flow complete, most of the request works but still working on generating the JWT.
This commit is contained in:
parent
1a8c63808a
commit
8782ef39c6
80 changed files with 1331 additions and 414 deletions
|
|
@ -1,9 +1,22 @@
|
|||
using System.Text;
|
||||
using IdentityShroud.Core.Model;
|
||||
using IdentityShroud.Core.Security;
|
||||
|
||||
namespace IdentityShroud.Core.Contracts;
|
||||
|
||||
public interface IDataEncryptionService
|
||||
{
|
||||
EncryptedValue Encrypt(ReadOnlySpan<byte> plain);
|
||||
byte[] Decrypt(EncryptedValue input);
|
||||
EncryptedValue Encrypt(RealmDek dek, ReadOnlySpan<byte> plain);
|
||||
byte[] Decrypt(IReadOnlyList<RealmDek> deks, EncryptedValue input);
|
||||
}
|
||||
|
||||
public static class DataEncryptionServiceExtensions
|
||||
{
|
||||
public static string DecryptUtf8ToString(
|
||||
this IDataEncryptionService des,
|
||||
IReadOnlyList<RealmDek> deks,
|
||||
EncryptedValue input)
|
||||
{
|
||||
return Encoding.UTF8.GetString(des.Decrypt(deks, input));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue