File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
NetDevPack.Security.Jwt.Core/DefaultStore
NetDevPack.Security.Jwt.Store.FileSystem
tests/NetDevPack.Security.Jwt.Tests/StoreTests Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ internal class InMemoryStore : IJsonWebKeyStore
13
13
14
14
public Task Store ( KeyMaterial keyMaterial )
15
15
{
16
+ if ( keyMaterial is null ) throw new InvalidOperationException ( "Can't store empty value." ) ;
17
+
16
18
_slim . Wait ( ) ;
17
19
_store . Add ( keyMaterial ) ;
18
20
_slim . Release ( ) ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ private string GetCurrentFile(JwtKeyType jwtKeyType)
30
30
{
31
31
var files = Directory . GetFiles ( KeysPath . FullName , $ "*current*.{ jwtKeyType } .key") ;
32
32
if ( files . Any ( ) )
33
- return Path . Combine ( KeysPath . FullName , files . First ( ) ) ;
33
+ return files . First ( ) ;
34
34
35
35
return Path . Combine ( KeysPath . FullName , $ "{ _options . Value . KeyPrefix } current.{ jwtKeyType } .key") ;
36
36
}
Original file line number Diff line number Diff line change 3
3
4
4
namespace NetDevPack . Security . Jwt . Tests . StoreTests
5
5
{
6
- // [Trait("Category", "InMemory Tests")]
7
- // public class FileSystemStoreTests : GenericStoreServiceTest<WarmupFileStore>
8
- // {
9
- // public FileSystemStoreTests(WarmupFileStore unifiedContext) : base(unifiedContext)
10
- // {
11
- // }
6
+ [ Trait ( "Category" , "InMemory Tests" ) ]
7
+ public class FileSystemStoreTests : GenericStoreServiceTest < WarmupFileStore >
8
+ {
9
+ public FileSystemStoreTests ( WarmupFileStore unifiedContext ) : base ( unifiedContext )
10
+ {
11
+ }
12
12
13
- // }
13
+ }
14
14
}
You can’t perform that action at this time.
0 commit comments