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
1313
1414 public Task Store ( KeyMaterial keyMaterial )
1515 {
16+ if ( keyMaterial is null ) throw new InvalidOperationException ( "Can't store empty value." ) ;
17+
1618 _slim . Wait ( ) ;
1719 _store . Add ( keyMaterial ) ;
1820 _slim . Release ( ) ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ private string GetCurrentFile(JwtKeyType jwtKeyType)
3030 {
3131 var files = Directory . GetFiles ( KeysPath . FullName , $ "*current*.{ jwtKeyType } .key") ;
3232 if ( files . Any ( ) )
33- return Path . Combine ( KeysPath . FullName , files . First ( ) ) ;
33+ return files . First ( ) ;
3434
3535 return Path . Combine ( KeysPath . FullName , $ "{ _options . Value . KeyPrefix } current.{ jwtKeyType } .key") ;
3636 }
Original file line number Diff line number Diff line change 33
44namespace NetDevPack . Security . Jwt . Tests . StoreTests
55{
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+ }
1212
13- // }
13+ }
1414}
You can’t perform that action at this time.
0 commit comments