C# Class MonkeyFist.Services.Authenticator

Show file Open project: robconery/monkey-fist Class Usage Examples

Public Methods

Method Description
AuthenticateUser ( Credentials creds ) : AuthenticationResult
AuthenticateUserByToken ( string token, string ip = "127.0.0.1" ) : AuthenticationResult
Authenticator ( Configuration config = null ) : System
CreateSession ( User user ) : UserSession
EndUserSession ( System.Guid sessionToken ) : bool
FindUserByAuthenticationToken ( ) : User
GetCurrentUser ( System.Guid sessionToken ) : User
HashedPasswordDoesNotMatch ( User user ) : bool
LocateUser ( ) : User
SetUserLoginStats ( User user ) : void
UserAuthenticated ( User user ) : void

Private Methods

Method Description
EmailOrPasswordNotPresent ( ) : bool
InvalidLogin ( string message ) : AuthenticationResult

Method Details

AuthenticateUser() public method

public AuthenticateUser ( Credentials creds ) : AuthenticationResult
creds Credentials
return AuthenticationResult

AuthenticateUserByToken() public method

public AuthenticateUserByToken ( string token, string ip = "127.0.0.1" ) : AuthenticationResult
token string
ip string
return AuthenticationResult

Authenticator() public method

public Authenticator ( Configuration config = null ) : System
config Configuration
return System

CreateSession() public method

public CreateSession ( User user ) : UserSession
user MonkeyFist.Models.User
return MonkeyFist.Models.UserSession

EndUserSession() public method

public EndUserSession ( System.Guid sessionToken ) : bool
sessionToken System.Guid
return bool

FindUserByAuthenticationToken() public method

public FindUserByAuthenticationToken ( ) : User
return MonkeyFist.Models.User

GetCurrentUser() public method

public GetCurrentUser ( System.Guid sessionToken ) : User
sessionToken System.Guid
return MonkeyFist.Models.User

HashedPasswordDoesNotMatch() public method

public HashedPasswordDoesNotMatch ( User user ) : bool
user MonkeyFist.Models.User
return bool

LocateUser() public method

public LocateUser ( ) : User
return MonkeyFist.Models.User

SetUserLoginStats() public method

public SetUserLoginStats ( User user ) : void
user MonkeyFist.Models.User
return void

UserAuthenticated() public method

public UserAuthenticated ( User user ) : void
user MonkeyFist.Models.User
return void