Apply suggestions from code review
Co-Authored-By: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -430,7 +430,7 @@ namespace Umbraco.Web.Security
|
||||
{
|
||||
if (app == null)
|
||||
{
|
||||
throw new ArgumentNullException("app");
|
||||
throw new ArgumentNullException(nameof(app));
|
||||
}
|
||||
return app.CreatePerOwinContext(createCallback, (options, instance) => instance.Dispose());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Umbraco.Web.Security
|
||||
{
|
||||
if (options == null)
|
||||
{
|
||||
throw new ArgumentNullException("options");
|
||||
throw new ArgumentNullException(nameof(options));
|
||||
}
|
||||
if (options.Provider == null)
|
||||
{
|
||||
|
||||
@@ -24,11 +24,7 @@ namespace Umbraco.Web.Security
|
||||
|
||||
return async context =>
|
||||
{
|
||||
var currentUtc = DateTimeOffset.UtcNow;
|
||||
if (context.Options != null && context.Options.SystemClock != null)
|
||||
{
|
||||
currentUtc = context.Options.SystemClock.UtcNow;
|
||||
}
|
||||
var currentUtc = context.Options?.SystemClock?.UtcNow ?? DateTimeOffset.UtcNow;
|
||||
|
||||
var issuedUtc = context.Properties.IssuedUtc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user