C# Class DotNetClub.Core.Service.AuthService

Inheritance: ServiceBase
Mostra file Open project: scheshan/DotNetClub Class Usage Examples

Public Methods

Method Description
AuthService ( IServiceProvider serviceProvider ) : DotNetClub.Core.Model.Auth
IsEmailRegistered ( string email ) : Task
IsUserNameRegistered ( string userName ) : Task
LogOut ( ) : void
Login ( LoginModel model ) : Task>
Register ( RegisterModel model ) : Task>

Private Methods

Method Description
ComputeNewToken ( ) : string
GenerateAndStoreToken ( long userID, bool rememberPassword ) : string

Method Details

AuthService() public method

public AuthService ( IServiceProvider serviceProvider ) : DotNetClub.Core.Model.Auth
serviceProvider IServiceProvider
return DotNetClub.Core.Model.Auth

IsEmailRegistered() public method

public IsEmailRegistered ( string email ) : Task
email string
return Task

IsUserNameRegistered() public method

public IsUserNameRegistered ( string userName ) : Task
userName string
return Task

LogOut() public method

public LogOut ( ) : void
return void

Login() public method

public Login ( LoginModel model ) : Task>
model DotNetClub.Core.Model.Auth.LoginModel
return Task>

Register() public method

public Register ( RegisterModel model ) : Task>
model DotNetClub.Core.Model.Auth.RegisterModel
return Task>