IManageRolesAsync
Assembly: ServiceStack.dll
View Source
Declaration
public interface IManageRolesAsync
Methods
GetRolesAsync(String, CancellationToken)
View Source
Declaration
Task<ICollection<string>> GetRolesAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>>
Parameters
Type | Name |
---|---|
System.String | userAuthId |
System.Threading.CancellationToken | token |
GetPermissionsAsync(String, CancellationToken)
View Source
Declaration
Task<ICollection<string>> GetPermissionsAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>>
Parameters
Type | Name |
---|---|
System.String | userAuthId |
System.Threading.CancellationToken | token |
GetRolesAndPermissionsAsync(String, CancellationToken)
View Source
Declaration
Task<Tuple<ICollection<string>, ICollection<string>>> GetRolesAndPermissionsAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Tuple<System.Collections.Generic.ICollection<System.String>,System.Collections.Generic.ICollection<System.String>>>
Parameters
Type | Name |
---|---|
System.String | userAuthId |
System.Threading.CancellationToken | token |
HasRoleAsync(String, String, CancellationToken)
View Source
Declaration
Task<bool> HasRoleAsync(string userAuthId, string role, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | userAuthId |
System.String | role |
System.Threading.CancellationToken | token |
HasPermissionAsync(String, String, CancellationToken)
View Source
Declaration
Task<bool> HasPermissionAsync(string userAuthId, string permission, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | userAuthId |
System.String | permission |
System.Threading.CancellationToken | token |
AssignRolesAsync(String, ICollection<String>, ICollection<String>, CancellationToken)
View Source
Declaration
Task AssignRolesAsync(string userAuthId, ICollection<string> roles = null, ICollection<string> permissions = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.String | userAuthId |
System.Collections.Generic.ICollection<System.String> | roles |
System.Collections.Generic.ICollection<System.String> | permissions |
System.Threading.CancellationToken | token |
UnAssignRolesAsync(String, ICollection<String>, ICollection<String>, CancellationToken)
View Source
Declaration
Task UnAssignRolesAsync(string userAuthId, ICollection<string> roles = null, ICollection<string> permissions = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.String | userAuthId |
System.Collections.Generic.ICollection<System.String> | roles |
System.Collections.Generic.ICollection<System.String> | permissions |
System.Threading.CancellationToken | token |