Skip to content

Commit e56a6b4

Browse files
committed
Changed variable name and added a bit of comments
1 parent 7639618 commit e56a6b4

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Fido2Demo/Controller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public MyController(IConfiguration config)
3131
ServerDomain = config["fido2:serverDomain"],
3232
ServerName = "Fido2 test",
3333
Origin = config["fido2:origin"],
34-
MetadataService = MDSMetadata.Instance(config["fido2:MDSAccessKey"], config["fido2:MDSCacheDir"])
34+
MetadataService = MDSMetadata.Instance(config["fido2:MDSAccessKey"], config["fido2:MDSCacheDirPath"])
3535
});
3636
}
3737

Fido2Demo/TestController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public TestController(IConfiguration config)
3535
ServerDomain = config["fido2:serverDomain"],
3636
ServerName = "Fido2 test",
3737
Origin = config["fido2:origin"],
38-
MetadataService = MDSMetadata.Instance(config["fido2:MDSAccessKey"], config["fido2:MDSCacheDir"])
38+
MetadataService = MDSMetadata.Instance(config["fido2:MDSAccessKey"], config["fido2:MDSCacheDirPath"])
3939
});
4040
}
4141

fido2-net-lib/MetadataService.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,20 @@ private MDSMetadata(string accessToken, string cachedirPath)
370370
// If the payload count is zero, we've failed to load metadata
371371
if (0 == payload.Count) throw new Fido2VerificationException("Failed to load MDS metadata");
372372
}
373-
public static IMetadataService Instance(string accesskey, string cachedir)
373+
/// <summary>
374+
/// Returns or creates an instance of the MetadataSerivce. The paramters will only be used when the singleton is not alreayd created.
375+
/// </summary>
376+
/// <param name="accesskey"></param>
377+
/// <param name="cachedirPath"></param>
378+
/// <returns></returns>
379+
public static IMetadataService Instance(string accesskey, string cachedirPath)
374380
{
375381
if (null == mDSMetadata)
376382
{
377383
lock (syncRoot)
378384
{
379385
if (null == mDSMetadata)
380-
mDSMetadata = new MDSMetadata(accesskey, cachedir);
386+
mDSMetadata = new MDSMetadata(accesskey, cachedirPath);
381387
}
382388
}
383389
return mDSMetadata;

0 commit comments

Comments
 (0)