C# Class JwtWebApi.Controllers.AccountController

Inheritance: ApiController
Afficher le fichier Open project: stewartm83/Jwt-WebApi

Méthodes publiques

Méthode Description
CreateSalt ( ) : string

Creates a random salt to be used for encrypting a password

EncryptPassword ( string password, string salt ) : string

Encrypts a password using the given salt

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
CreateToken ( User user, object &dbUser ) : string

Create a Jwt with user information

CreateUser ( RegisterViewModel registerDetails ) : User

Create a new user and saves it to the database

Login ( LoginViewModel model ) : HttpResponseMessage
Register ( RegisterViewModel model ) : HttpResponseMessage

Method Details

CreateSalt() public static méthode

Creates a random salt to be used for encrypting a password
public static CreateSalt ( ) : string
Résultat string

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

EncryptPassword() public static méthode

Encrypts a password using the given salt
public static EncryptPassword ( string password, string salt ) : string
password string
salt string
Résultat string