C# Class Skimur.App.Services.Impl.MembershipService

Inheritance: IMembershipService
Exibir arquivo Open project: skimur/skimur

Public Methods

Method Description
AddRemoteLogin ( System.Guid userId, string loginProvider, string loginKey ) : void

Add a remote login for a user

AddUserToRole ( System.Guid userId, System.Guid roleId ) : bool
CanChangedEmail ( System.Guid userId, string email ) : bool
DeleteRole ( System.Guid roleId ) : bool
DeleteUser ( System.Guid userId ) : bool
FindUserByExternalLogin ( string loginProvider, string loginKey ) : User

Find a user by an external login

GetAllUsers ( int skip = null, int take = null ) : SeekedList

All the users in the system

GetRemoteLoginsForUser ( System.Guid userId ) : IList

Get logins for user

GetRoleById ( System.Guid id ) : Role
GetRoleByName ( string roleName ) : Role
GetRoles ( ) : IList
GetUserByEmail ( string emailAddress ) : User
GetUserById ( System.Guid userId ) : User
GetUserByUserName ( string userName ) : User
GetUserRoles ( System.Guid userId ) : IList
GetUsersByIds ( List ids ) : List

Get a list of users by ids

InsertRole ( Role role ) : bool
InsertUser ( User user ) : bool
IsEmailValid ( string email ) : bool
IsInRole ( System.Guid userId, System.Guid roleId ) : bool
IsPasswordValid ( string password ) : bool
IsUserNameValid ( string userName ) : bool
MembershipService ( IDbConnectionProvider conn, IPasswordManager passwordManager ) : System
RemoveRemoteLogin ( System.Guid userId, string loginProvider, string loginKey ) : void

Remove a remote login from a user

RemoveUserFromRole ( System.Guid userId, System.Guid roleId ) : bool
ResetAccessFailedCount ( System.Guid userId ) : void

Reset the access failed count for the user

UpdateRole ( Role role ) : bool
UpdateUser ( User user ) : bool
UpdateUserAvatar ( System.Guid userId, string avatarIdentifier ) : void

Updates the user's avatar identifier.

UpdateUserProfile ( System.Guid userId, string fullName, string bio, string url, string location ) : void

Updates just profile data about a user

ValidateUser ( User user ) : UserValidationResult

Validate the user (update or insert)

Method Details

AddRemoteLogin() public method

Add a remote login for a user
public AddRemoteLogin ( System.Guid userId, string loginProvider, string loginKey ) : void
userId System.Guid
loginProvider string
loginKey string
return void

AddUserToRole() public method

public AddUserToRole ( System.Guid userId, System.Guid roleId ) : bool
userId System.Guid
roleId System.Guid
return bool

CanChangedEmail() public method

public CanChangedEmail ( System.Guid userId, string email ) : bool
userId System.Guid
email string
return bool

DeleteRole() public method

public DeleteRole ( System.Guid roleId ) : bool
roleId System.Guid
return bool

DeleteUser() public method

public DeleteUser ( System.Guid userId ) : bool
userId System.Guid
return bool

FindUserByExternalLogin() public method

Find a user by an external login
public FindUserByExternalLogin ( string loginProvider, string loginKey ) : User
loginProvider string
loginKey string
return User

GetAllUsers() public method

All the users in the system
public GetAllUsers ( int skip = null, int take = null ) : SeekedList
skip int
take int
return SeekedList

GetRemoteLoginsForUser() public method

Get logins for user
public GetRemoteLoginsForUser ( System.Guid userId ) : IList
userId System.Guid
return IList

GetRoleById() public method

public GetRoleById ( System.Guid id ) : Role
id System.Guid
return Role

GetRoleByName() public method

public GetRoleByName ( string roleName ) : Role
roleName string
return Role

GetRoles() public method

public GetRoles ( ) : IList
return IList

GetUserByEmail() public method

public GetUserByEmail ( string emailAddress ) : User
emailAddress string
return User

GetUserById() public method

public GetUserById ( System.Guid userId ) : User
userId System.Guid
return User

GetUserByUserName() public method

public GetUserByUserName ( string userName ) : User
userName string
return User

GetUserRoles() public method

public GetUserRoles ( System.Guid userId ) : IList
userId System.Guid
return IList

GetUsersByIds() public method

Get a list of users by ids
public GetUsersByIds ( List ids ) : List
ids List
return List

InsertRole() public method

public InsertRole ( Role role ) : bool
role Role
return bool

InsertUser() public method

public InsertUser ( User user ) : bool
user User
return bool

IsEmailValid() public method

public IsEmailValid ( string email ) : bool
email string
return bool

IsInRole() public method

public IsInRole ( System.Guid userId, System.Guid roleId ) : bool
userId System.Guid
roleId System.Guid
return bool

IsPasswordValid() public method

public IsPasswordValid ( string password ) : bool
password string
return bool

IsUserNameValid() public method

public IsUserNameValid ( string userName ) : bool
userName string
return bool

MembershipService() public method

public MembershipService ( IDbConnectionProvider conn, IPasswordManager passwordManager ) : System
conn IDbConnectionProvider
passwordManager IPasswordManager
return System

RemoveRemoteLogin() public method

Remove a remote login from a user
public RemoveRemoteLogin ( System.Guid userId, string loginProvider, string loginKey ) : void
userId System.Guid
loginProvider string
loginKey string
return void

RemoveUserFromRole() public method

public RemoveUserFromRole ( System.Guid userId, System.Guid roleId ) : bool
userId System.Guid
roleId System.Guid
return bool

ResetAccessFailedCount() public method

Reset the access failed count for the user
public ResetAccessFailedCount ( System.Guid userId ) : void
userId System.Guid
return void

UpdateRole() public method

public UpdateRole ( Role role ) : bool
role Role
return bool

UpdateUser() public method

public UpdateUser ( User user ) : bool
user User
return bool

UpdateUserAvatar() public method

Updates the user's avatar identifier.
public UpdateUserAvatar ( System.Guid userId, string avatarIdentifier ) : void
userId System.Guid The user identifier.
avatarIdentifier string The avatar identifier.
return void

UpdateUserProfile() public method

Updates just profile data about a user
public UpdateUserProfile ( System.Guid userId, string fullName, string bio, string url, string location ) : void
userId System.Guid The user identifier.
fullName string The full name.
bio string The bio.
url string The URL.
location string The location.
return void

ValidateUser() public method

Validate the user (update or insert)
public ValidateUser ( User user ) : UserValidationResult
user User
return UserValidationResult