Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
raman-m committed Aug 25, 2023
1 parent 90a5f3e commit 3560bb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
17 changes: 6 additions & 11 deletions src/Ocelot/Middleware/OcelotPipelineConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,15 @@ public class OcelotPipelineConfiguration
public Func<HttpContext, Func<Task>, Task> AuthenticationMiddleware { get; set; }

/// <summary>
/// This is to allow the user to run any extra authentication after the Ocelot authentication
/// kicks in
/// This is to allow the user to run any extra authentication after the Ocelot authentication kicks in.
/// </summary>
/// <value>
/// <placeholder>This is to allow the user to run any extra authentication after the Ocelot authentication
/// kicks in</placeholder>
/// A <see cref="Func{HttpContext, TFunc, Task}"/> delegate object.
/// </value>
public Func<HttpContext, Func<Task>, Task> AfterAuthenticationMiddleware { get; set; }

/// <summary>
/// This is to allow the user to run any extra authorization before the Ocelot authentication
/// kicks in
/// This is to allow the user to run any extra authorization before the Ocelot authentication kicks in.
/// </summary>
/// <value>
/// A <see cref="Func{HttpContext, TFunc, Task}"/> delegate object.
Expand All @@ -63,17 +60,15 @@ public class OcelotPipelineConfiguration
public Func<HttpContext, Func<Task>, Task> AuthorizationMiddleware { get; set; }

/// <summary>
/// This is to allow the user to run any extra authorization after the Ocelot authentication
/// kicks in
/// This is to allow the user to run any extra authorization after the Ocelot authorization kicks in.
/// </summary>
/// <value>
/// <placeholder>This is to allow the user to run any extra authorization after the Ocelot authentication
/// kicks in</placeholder>
/// A <see cref="Func{HttpContext, TFunc, Task}"/> delegate object.
/// </value>
public Func<HttpContext, Func<Task>, Task> AfterAuthorizationMiddleware { get; set; }

/// <summary>
/// This allows the user to implement there own query string manipulation logic
/// This allows the user to implement there own query string manipulation logic.
/// </summary>
/// <value>
/// A <see cref="Func{HttpContext, TFunc, Task}"/> delegate object.
Expand Down
20 changes: 10 additions & 10 deletions test/Ocelot.AcceptanceTests/CustomMiddlewareTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ public void should_call_after_authorization_middleware()
{
var configuration = new OcelotPipelineConfiguration
{
AfterAuthorizationMiddleware = async (ctx, next) =>
AfterAuthorizationMiddleware = async (ctx, next) =>
{
_counter++;
await next.Invoke();
}
},
};

var port = RandomPortFinder.GetRandomPort();
Expand All @@ -285,13 +285,13 @@ public void should_call_after_authorization_middleware()
{
Host = "localhost",
Port = port,
}
},
},
DownstreamScheme = "http",
UpstreamPathTemplate = "/",
UpstreamHttpMethod = new List<string> { "Get" },
}
}
},
},
};

this.Given(x => x.GivenThereIsAServiceRunningOn($"http://localhost:{port}", 200, ""))
Expand Down Expand Up @@ -353,11 +353,11 @@ public void should_call_after_http_authentication_middleware()
{
var configuration = new OcelotPipelineConfiguration
{
AfterAuthenticationMiddleware = async (ctx, next) =>
AfterAuthenticationMiddleware = async (ctx, next) =>
{
_counter++;
await next.Invoke();
}
},
};

var port = RandomPortFinder.GetRandomPort();
Expand All @@ -375,13 +375,13 @@ public void should_call_after_http_authentication_middleware()
{
Host = "localhost",
Port = port,
}
},
},
DownstreamScheme = "http",
UpstreamPathTemplate = "/",
UpstreamHttpMethod = new List<string> { "Get" },
}
}
},
},
};

this.Given(x => x.GivenThereIsAServiceRunningOn($"http://localhost:{port}", 200, ""))
Expand Down

0 comments on commit 3560bb9

Please sign in to comment.