-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add authorization support. Add support for dispatching hydro events f…
…rom client side without additional road trip to the backend.
- Loading branch information
Showing
8 changed files
with
2,223 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.AspNetCore.Http; | ||
|
||
namespace Hydro; | ||
|
||
/// <summary> | ||
/// A filter that confirms component authorization | ||
/// </summary> | ||
public interface IHydroAuthorizationFilter | ||
{ | ||
/// <summary> | ||
/// Called early in the component pipeline to confirm request is authorized | ||
/// </summary> | ||
/// <param name="httpContext">HttpContext</param> | ||
/// <param name="component">Hydro component instance</param> | ||
/// <returns>Indication if the the operation is authorized</returns> | ||
Task<bool> AuthorizeAsync(HttpContext httpContext, object component); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.