Initialize the Account Service
var srv = new AccountService(BaseClient)


Register a new User
   var response = srv.RegisterUser(new RegistrationModel()
          {
            Email = email,
            Password = password,
            ConfirmPassword = password
          });

Response is 200 when ok
500 when not ok. In case of an error the response object contains the error description

Request a Token for a User (e.g login a user)
 var srv = new AccountService(client);
 var token = await srv.GetBearerToken(new LoginModel() { Username = "", Password = "" });

Token is null on a failure, Token contains the Token together with basic User information on
success.

Note: Per Default the controller root is set to: "\API\Account" .
if you changed that, you need to tell the AccountService where to look at:
 var srv = new AccountService(client,<AlternativeAccountControllerRoot>);

Last edited Dec 16, 2014 at 9:01 PM by DeeJayTC, version 8