UserAuthRepositoryExtensions
Assembly: ServiceStack.dll
Declaration
public static class UserAuthRepositoryExtensions
Methods
AssignRoles(IAuthRepository, IUserAuth, ICollection<String>, ICollection<String>)
Creates the required missing tables or DB schema
Declaration
public static void AssignRoles(this IAuthRepository userAuthRepo, IUserAuth userAuth, ICollection<string> roles = null, ICollection<string> permissions = null)
Parameters
AssignRolesAsync(IAuthRepositoryAsync, IUserAuth, ICollection<String>, ICollection<String>, CancellationToken)
Creates the required missing tables or DB schema
Declaration
public static async Task AssignRolesAsync(this IAuthRepositoryAsync userAuthRepo, IUserAuth userAuth, ICollection<string> roles = null, ICollection<string> permissions = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
UnAssignRoles(IAuthRepository, IUserAuth, ICollection<String>, ICollection<String>)
Declaration
public static void UnAssignRoles(this IAuthRepository userAuthRepo, IUserAuth userAuth, ICollection<string> roles = null, ICollection<string> permissions = null)
Parameters
UnAssignRolesAsync(IAuthRepositoryAsync, IUserAuth, ICollection<String>, ICollection<String>, CancellationToken)
Declaration
public static async Task UnAssignRolesAsync(this IAuthRepositoryAsync userAuthRepo, IUserAuth userAuth, ICollection<string> roles = null, ICollection<string> permissions = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
GetRoles(IAuthRepository, IUserAuth)
Declaration
public static ICollection<string> GetRoles(this IAuthRepository userAuthRepo, IUserAuth userAuth)
Returns
System.Collections.Generic.ICollection<System.String>
Parameters
GetRolesAsync(IAuthRepositoryAsync, IUserAuth, CancellationToken)
Declaration
public static async Task<ICollection<string>> GetRolesAsync(this IAuthRepositoryAsync userAuthRepo, IUserAuth userAuth, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>>
Parameters
GetPermissions(IAuthRepository, IUserAuth)
Declaration
public static ICollection<string> GetPermissions(this IAuthRepository userAuthRepo, IUserAuth userAuth)
Returns
System.Collections.Generic.ICollection<System.String>
Parameters
GetPermissionsAsync(IAuthRepositoryAsync, IUserAuth, CancellationToken)
Declaration
public static async Task<ICollection<string>> GetPermissionsAsync(this IAuthRepositoryAsync userAuthRepo, IUserAuth userAuth, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>>
Parameters
GetAuthTokens(IAuthRepository, String)
Declaration
public static List<IAuthTokens> GetAuthTokens(this IAuthRepository repo, string userAuthId)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IAuthTokens>
Parameters
GetAuthTokensAsync(IAuthRepositoryAsync, String, CancellationToken)
Declaration
public static async Task<List<IAuthTokens>> GetAuthTokensAsync(this IAuthRepositoryAsync repo, string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IAuthTokens>>
Parameters
PopulateSession(IAuthSession, IUserAuth, IAuthRepository)
Declaration
public static void PopulateSession(this IAuthSession session, IUserAuth userAuth, IAuthRepository authRepo = null)
Parameters
PopulateSessionAsync(IAuthSession, IUserAuth, IAuthRepositoryAsync, CancellationToken)
Declaration
public static async Task PopulateSessionAsync(this IAuthSession session, IUserAuth userAuth, IAuthRepositoryAsync authRepo = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
GetUserAuthDetails(IAuthRepository, Int32)
Declaration
public static List<IUserAuthDetails> GetUserAuthDetails(this IAuthRepository authRepo, int userAuthId)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>
Parameters
GetUserAuthDetailsAsync(IAuthRepositoryAsync, Int32, CancellationToken)
Declaration
public static Task<List<IUserAuthDetails>> GetUserAuthDetailsAsync(this IAuthRepositoryAsync authRepo, int userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>>
Parameters
GetUserAuth(IUserAuthRepository, Int32)
Declaration
public static IUserAuth GetUserAuth(this IUserAuthRepository authRepo, int userAuthId)
Returns
ServiceStack.Auth.IUserAuth
Parameters
GetUserAuthAsync(IUserAuthRepositoryAsync, Int32, CancellationToken)
Declaration
public static Task<IUserAuth> GetUserAuthAsync(this IUserAuthRepositoryAsync authRepo, int userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
DeleteUserAuth(IUserAuthRepository, Int32)
Declaration
public static void DeleteUserAuth(this IUserAuthRepository authRepo, int userAuthId)
Parameters
DeleteUserAuthAsync(IUserAuthRepositoryAsync, Int32, CancellationToken)
Declaration
public static Task DeleteUserAuthAsync(this IUserAuthRepositoryAsync authRepo, int userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
GetRoles(IManageRoles, Int32)
Declaration
public static ICollection<string> GetRoles(this IManageRoles manageRoles, int userAuthId)
Returns
System.Collections.Generic.ICollection<System.String>
Parameters
GetRolesAsync(IManageRolesAsync, Int32, CancellationToken)
Declaration
public static Task<ICollection<string>> GetRolesAsync(this IManageRolesAsync manageRoles, int userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>>
Parameters
GetPermissions(IManageRoles, Int32)
Declaration
public static ICollection<string> GetPermissions(this IManageRoles manageRoles, int userAuthId)
Returns
System.Collections.Generic.ICollection<System.String>
Parameters
GetPermissionsAsync(IManageRolesAsync, Int32, CancellationToken)
Declaration
public static Task<ICollection<string>> GetPermissionsAsync(this IManageRolesAsync manageRoles, int userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<System.String>>
Parameters
HasRole(IManageRoles, Int32, String)
Declaration
public static bool HasRole(this IManageRoles manageRoles, int userAuthId, string role)
Returns
System.Boolean
Parameters
HasRoleAsync(IManageRolesAsync, Int32, String, CancellationToken)
Declaration
public static Task<bool> HasRoleAsync(this IManageRolesAsync manageRoles, int userAuthId, string role, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
HasPermission(IManageRoles, Int32, String)
Declaration
public static bool HasPermission(this IManageRoles manageRoles, int userAuthId, string permission)
Returns
System.Boolean
Parameters
HasPermissionAsync(IManageRolesAsync, Int32, String, CancellationToken)
Declaration
public static Task<bool> HasPermissionAsync(this IManageRolesAsync manageRoles, int userAuthId, string permission, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
AssignRoles(IManageRoles, Int32, ICollection<String>, ICollection<String>)
Declaration
public static void AssignRoles(this IManageRoles manageRoles, int userAuthId, ICollection<string> roles = null, ICollection<string> permissions = null)
Parameters
Type | Name |
---|
ServiceStack.Auth.IManageRoles | manageRoles |
System.Int32 | userAuthId |
System.Collections.Generic.ICollection<System.String> | roles |
System.Collections.Generic.ICollection<System.String> | permissions |
AssignRolesAsync(IManageRolesAsync, Int32, ICollection<String>, ICollection<String>, CancellationToken)
Declaration
public static Task AssignRolesAsync(this IManageRolesAsync manageRoles, int userAuthId, ICollection<string> roles = null, ICollection<string> permissions = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
ServiceStack.Auth.IManageRolesAsync | manageRoles |
System.Int32 | userAuthId |
System.Collections.Generic.ICollection<System.String> | roles |
System.Collections.Generic.ICollection<System.String> | permissions |
System.Threading.CancellationToken | token |
UnAssignRoles(IManageRoles, Int32, ICollection<String>, ICollection<String>)
Declaration
public static void UnAssignRoles(this IManageRoles manageRoles, int userAuthId, ICollection<string> roles = null, ICollection<string> permissions = null)
Parameters
Type | Name |
---|
ServiceStack.Auth.IManageRoles | manageRoles |
System.Int32 | userAuthId |
System.Collections.Generic.ICollection<System.String> | roles |
System.Collections.Generic.ICollection<System.String> | permissions |
UnAssignRolesAsync(IManageRolesAsync, Int32, ICollection<String>, ICollection<String>, CancellationToken)
Declaration
public static Task UnAssignRolesAsync(this IManageRolesAsync manageRoles, int userAuthId, ICollection<string> roles = null, ICollection<string> permissions = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
ServiceStack.Auth.IManageRolesAsync | manageRoles |
System.Int32 | userAuthId |
System.Collections.Generic.ICollection<System.String> | roles |
System.Collections.Generic.ICollection<System.String> | permissions |
System.Threading.CancellationToken | token |
CreateUserAuth(IAuthRepository, IUserAuth, String)
Declaration
public static IUserAuth CreateUserAuth(this IAuthRepository authRepo, IUserAuth newUser, string password)
Returns
ServiceStack.Auth.IUserAuth
Parameters
CreateUserAuthAsync(IAuthRepositoryAsync, IUserAuth, String, CancellationToken)
Declaration
public static Task<IUserAuth> CreateUserAuthAsync(this IAuthRepositoryAsync authRepo, IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
UpdateUserAuth(IAuthRepository, IUserAuth, IUserAuth)
Declaration
public static IUserAuth UpdateUserAuth(this IAuthRepository authRepo, IUserAuth existingUser, IUserAuth newUser)
Returns
ServiceStack.Auth.IUserAuth
Parameters
UpdateUserAuthAsync(IAuthRepositoryAsync, IUserAuth, IUserAuth, CancellationToken)
Declaration
public static Task<IUserAuth> UpdateUserAuthAsync(this IAuthRepositoryAsync authRepo, IUserAuth existingUser, IUserAuth newUser, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
UpdateUserAuth(IAuthRepository, IUserAuth, IUserAuth, String)
Declaration
public static IUserAuth UpdateUserAuth(this IAuthRepository authRepo, IUserAuth existingUser, IUserAuth newUser, string password)
Returns
ServiceStack.Auth.IUserAuth
Parameters
UpdateUserAuthAsync(IAuthRepositoryAsync, IUserAuth, IUserAuth, String, CancellationToken)
Declaration
public static Task<IUserAuth> UpdateUserAuthAsync(this IAuthRepositoryAsync authRepo, IUserAuth existingUser, IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
GetUserAuth(IAuthRepository, String)
Declaration
public static IUserAuth GetUserAuth(this IAuthRepository authRepo, string userAuthId)
Returns
ServiceStack.Auth.IUserAuth
Parameters
GetUserAuthAsync(IAuthRepositoryAsync, String, CancellationToken)
Declaration
public static Task<IUserAuth> GetUserAuthAsync(this IAuthRepositoryAsync authRepo, string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
DeleteUserAuth(IAuthRepository, String)
Declaration
public static void DeleteUserAuth(this IAuthRepository authRepo, string userAuthId)
Parameters
DeleteUserAuthAsync(IAuthRepositoryAsync, String, CancellationToken)
Declaration
public static Task DeleteUserAuthAsync(this IAuthRepositoryAsync authRepo, string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
GetUserAuths(IAuthRepository, String, Nullable<Int32>, Nullable<Int32>)
Declaration
public static List<IUserAuth> GetUserAuths(this IAuthRepository authRepo, string orderBy = null, int? skip = null, int? take = null)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
GetUserAuthsAsync(IAuthRepositoryAsync, String, Nullable<Int32>, Nullable<Int32>, CancellationToken)
Declaration
public static Task<List<IUserAuth>> GetUserAuthsAsync(this IAuthRepositoryAsync authRepo, string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>
Parameters
SearchUserAuths(IAuthRepository, String, String, Nullable<Int32>, Nullable<Int32>)
Declaration
public static List<IUserAuth> SearchUserAuths(this IAuthRepository authRepo, string query, string orderBy = null, int? skip = null, int? take = null)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
SearchUserAuthsAsync(IAuthRepositoryAsync, String, String, Nullable<Int32>, Nullable<Int32>, CancellationToken)
Declaration
public static Task<List<IUserAuth>> SearchUserAuthsAsync(this IAuthRepositoryAsync authRepo, string query, string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>
Parameters
Type | Name |
---|
ServiceStack.Auth.IAuthRepositoryAsync | authRepo |
System.String | query |
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
System.Threading.CancellationToken | token |
MergeRolesAsync(IAuthRepositoryAsync, String, String, ICollection<String>, CancellationToken)
Declaration
public static async Task MergeRolesAsync(this IAuthRepositoryAsync authRepo, string userAuthId, string source, ICollection<string> roles, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
ServiceStack.Auth.IAuthRepositoryAsync | authRepo |
System.String | userAuthId |
System.String | source |
System.Collections.Generic.ICollection<System.String> | roles |
System.Threading.CancellationToken | token |
GetLocalRolesAndPermissionsAsync(IManageRolesAsync, String, CancellationToken)
Declaration
public static Task<Tuple<ICollection<string>, ICollection<string>>> GetLocalRolesAndPermissionsAsync(this IManageRolesAsync manageRoles, 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
ValidateNewUser(IUserAuth)
Declaration
public static void ValidateNewUser(this IUserAuth newUser)
Parameters
ValidateNewUser(IUserAuth, String)
Declaration
public static void ValidateNewUser(this IUserAuth newUser, string password)
Parameters