namespace HopFrame.Core.Services; /// /// This handler is used by the HopFrame for authenticating the user that wants to access the admin ui. /// By default, everyone is allowed to access the admin ui, but you can implement and register this interface /// yourself as a scoped dependency if you only want some users to access the admin ui (recommended) /// public interface IHopFrameAuthHandler { /// /// Gets called by the admin ui in order to verify if the user has all necessary policies to perform an action /// /// If specified, the policy the user needs to perform the action /// True: The user is permitted to perform the action
False: The user is not permitted to perform the action
public Task IsAuthenticatedAsync(string? policy); /// /// If enabled, this method is used to get the name of the currently logged-in user in order to display it in the admin ui /// /// The display name of the currently logged-in user /// public Task GetCurrentUserDisplayNameAsync(); }