C# Class NSemble.Core.Nancy.NSembleUserAuthentication

Mostrar archivo Open project: synhershko/NSemble Class Usage Examples

Public Methods

Method Description
GetUserFromApiKey ( IDocumentSession ravenSession, string apiKey ) : IUserIdentity
RemoveApiKey ( IDocumentSession ravenSession, string apiKey ) : void
SetUserPassword ( User user, string password ) : User
ValidateUser ( IDocumentSession ravenSession, string username, string password ) : string

Private Methods

Method Description
CompareByteArrays ( byte array1, byte array2 ) : bool
CreateSalt ( int size ) : byte[]
GenerateSaltedHash ( string plainText, byte saltBytes ) : byte[]
GetApiKeyDocumentId ( string apiKey ) : string

Method Details

GetUserFromApiKey() public static method

public static GetUserFromApiKey ( IDocumentSession ravenSession, string apiKey ) : IUserIdentity
ravenSession IDocumentSession
apiKey string
return IUserIdentity

RemoveApiKey() public static method

public static RemoveApiKey ( IDocumentSession ravenSession, string apiKey ) : void
ravenSession IDocumentSession
apiKey string
return void

SetUserPassword() public static method

public static SetUserPassword ( User user, string password ) : User
user NSemble.Core.Models.User
password string
return NSemble.Core.Models.User

ValidateUser() public static method

public static ValidateUser ( IDocumentSession ravenSession, string username, string password ) : string
ravenSession IDocumentSession
username string
password string
return string