2023-03-03 21:47:23 +00:00
|
|
|
using Elsa.Http.Contracts;
|
2022-05-26 10:47:31 +00:00
|
|
|
using Elsa.Http.Models;
|
2022-03-09 23:19:00 +00:00
|
|
|
|
2022-11-19 21:30:43 +00:00
|
|
|
namespace Elsa.Http.Handlers;
|
|
|
|
|
|
2023-05-01 10:06:51 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// A default <see cref="IHttpEndpointAuthorizationHandler"/> that allows all requests.
|
|
|
|
|
/// </summary>
|
2022-11-19 21:30:43 +00:00
|
|
|
public class AllowAnonymousHttpEndpointAuthorizationHandler : IHttpEndpointAuthorizationHandler
|
2022-03-09 23:19:00 +00:00
|
|
|
{
|
2023-05-01 10:06:51 +00:00
|
|
|
/// <inheritdoc />
|
2022-11-19 21:30:43 +00:00
|
|
|
public ValueTask<bool> AuthorizeAsync(AuthorizeHttpEndpointContext context) => new(true);
|
2022-03-09 23:19:00 +00:00
|
|
|
}
|