-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions
committed
Apr 13, 2021
1 parent
6ce0269
commit a9ceab4
Showing
2 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Project: Aguafrommars/TheIdServer | ||
// Copyright (c) 2021 @Olivier Lefebvre | ||
using Aguacongas.IdentityServer.Admin.Services; | ||
using Aguacongas.IdentityServer.Store; | ||
using Aguacongas.IdentityServer.Store.Entity; | ||
using Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel; | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace Aguacongas.TheIdServer.Services | ||
{ | ||
public class KeyStore<T1, T2> : IKeyStore<T1> where T2 : IAuthenticatedEncryptorDescriptor | ||
{ | ||
private readonly KeyManagerWrapper<T2> _wrapper; | ||
|
||
public KeyStore(KeyManagerWrapper<T2> wrapper) | ||
{ | ||
_wrapper = wrapper ?? throw new ArgumentNullException(nameof(wrapper)); | ||
} | ||
|
||
public Task<PageResponse<Key>> GetAllKeysAsync(CancellationToken cancellationToken = default) | ||
=> Task.FromResult(_wrapper.GetAllKeys()); | ||
|
||
public Task RevokeKeyAsync(string id, string reason, CancellationToken cancellationToken = default) | ||
=> throw new NotImplementedException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters