Example #1
0
        public StatelessAuthTests()
        {
            LogManager.LogFactory = new ConsoleLogFactory();
            appHost = new AppHost {
                EnableAuth = true
            }
            .Init()
            .Start("http://*:2337/");

            var client = GetClient();

            client.Post(new Register {
                UserName    = "******",
                Password    = "******",
                Email       = "as@if{0}.com",
                DisplayName = "DisplayName",
                FirstName   = "FirstName",
                LastName    = "LastName",
            });

            using (var db = appHost.Resolve <IDbConnectionFactory>().OpenDbConnection())
            {
                ApiKey = db.Select <ApiKey>().First();
                ApiKey.PrintDump();
            }
        }