Class AuthorizationService
Represents an authorization service that provides functionality to manage permission sets for users. Implements the IAuthorizationService interface.
Inheritance
Implements
Inherited Members
Namespace: DataWeb.Authorization
Assembly: DataWeb.Core.dll
Syntax
public class AuthorizationService : IAuthorizationService
Constructors
AuthorizationService(IHttpService, ICacheService, IReflectionService, IAppErrorService, IServiceProvider, IPermissionSetStore)
Initializes a new instance of the AuthorizationService class with the specified dependencies.
Declaration
public AuthorizationService(IHttpService httpService, ICacheService cacheService, IReflectionService reflectionService, IAppErrorService appErrorService, IServiceProvider serviceProvider, IPermissionSetStore permissionSetStore)
Parameters
Type | Name | Description |
---|---|---|
IHttpService | httpService | |
ICacheService | cacheService | |
IReflectionService | reflectionService | |
IAppErrorService | appErrorService | |
IServiceProvider | serviceProvider | |
IPermissionSetStore | permissionSetStore |
Methods
GetPermissionSetAsync(string, IUser)
Asynchronously retrieves a permission set for the specified user by name.
Declaration
public Task<PermissionSet> GetPermissionSetAsync(string name, IUser user)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the permission set. |
IUser | user | The IUser for which the permission set should be retrieved. |
Returns
Type | Description |
---|---|
Task<PermissionSet> | A System.Threading.Tasks.Task that represents the asynchronous operation. The task result contains the retrieved PermissionSet. |
GetPermissionSetsAsync(IUser)
Asynchronously retrieves all permission sets for the specified user.
Declaration
public Task<IEnumerable<PermissionSet>> GetPermissionSetsAsync(IUser user)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | The IUser for which the permission sets should be retrieved. |
Returns
Type | Description |
---|---|
Task<IEnumerable<PermissionSet>> | A System.Threading.Tasks.Task that represents the asynchronous operation. The task result contains an System.Collections.Generic.IEnumerable<T> of PermissionSet instances. |