C# Class NuGetGallery.UserService

Inheritance: IUserService
ファイルを表示 Open project: chocolatey/chocolatey.org Class Usage Examples

Public Methods

Method Description
ChangePassword ( string username, string oldPassword, string newPassword ) : bool
ConfirmEmailAddress ( User user, string token ) : bool
Create ( string username, string password, string emailAddress ) : User
FindByApiKey ( System.Guid apiKey ) : User
FindByEmailAddress ( string emailAddress ) : User
FindByUnconfimedEmailAddress ( string unconfirmedEmailAddress ) : User
FindByUserId ( int userKey ) : User
FindByUsername ( string username ) : User
FindByUsernameAndPassword ( string username, string password ) : User
FindByUsernameOrEmailAddressAndPassword ( string usernameOrEmail, string password ) : User
GenerateApiKey ( string username ) : string
GeneratePasswordResetToken ( string usernameOrEmail, int tokenExpirationMinutes ) : User
ResetPasswordWithToken ( string username, string token, string newPassword ) : bool
UpdateProfile ( User user, string emailAddress, bool emailAllowed ) : void
UpdateProfile ( User user, string emailAddress, bool emailAllowed, bool emailAllModerationNotifications ) : void
UserService ( IConfiguration config, ICryptographyService cryptoSvc, IEntityRepository userRepo ) : System

Private Methods

Method Description
ChangePasswordInternal ( User user, string newPassword ) : void

Method Details

ChangePassword() public method

public ChangePassword ( string username, string oldPassword, string newPassword ) : bool
username string
oldPassword string
newPassword string
return bool

ConfirmEmailAddress() public method

public ConfirmEmailAddress ( User user, string token ) : bool
user User
token string
return bool

Create() public method

public Create ( string username, string password, string emailAddress ) : User
username string
password string
emailAddress string
return User

FindByApiKey() public method

public FindByApiKey ( System.Guid apiKey ) : User
apiKey System.Guid
return User

FindByEmailAddress() public method

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

FindByUnconfimedEmailAddress() public method

public FindByUnconfimedEmailAddress ( string unconfirmedEmailAddress ) : User
unconfirmedEmailAddress string
return User

FindByUserId() public method

public FindByUserId ( int userKey ) : User
userKey int
return User

FindByUsername() public method

public FindByUsername ( string username ) : User
username string
return User

FindByUsernameAndPassword() public method

public FindByUsernameAndPassword ( string username, string password ) : User
username string
password string
return User

FindByUsernameOrEmailAddressAndPassword() public method

public FindByUsernameOrEmailAddressAndPassword ( string usernameOrEmail, string password ) : User
usernameOrEmail string
password string
return User

GenerateApiKey() public method

public GenerateApiKey ( string username ) : string
username string
return string

GeneratePasswordResetToken() public method

public GeneratePasswordResetToken ( string usernameOrEmail, int tokenExpirationMinutes ) : User
usernameOrEmail string
tokenExpirationMinutes int
return User

ResetPasswordWithToken() public method

public ResetPasswordWithToken ( string username, string token, string newPassword ) : bool
username string
token string
newPassword string
return bool

UpdateProfile() public method

public UpdateProfile ( User user, string emailAddress, bool emailAllowed ) : void
user User
emailAddress string
emailAllowed bool
return void

UpdateProfile() public method

public UpdateProfile ( User user, string emailAddress, bool emailAllowed, bool emailAllModerationNotifications ) : void
user User
emailAddress string
emailAllowed bool
emailAllModerationNotifications bool
return void

UserService() public method

public UserService ( IConfiguration config, ICryptographyService cryptoSvc, IEntityRepository userRepo ) : System
config IConfiguration
cryptoSvc ICryptographyService
userRepo IEntityRepository
return System