﻿namespace Nancy.Demo.Authentication.Basic
{
    using Nancy.Authentication.Basic;
    using Nancy.Security;

	public class UserValidator : IUserValidator
	{
		public IUserIdentity Validate(string username, string password)
		{
		   if (username == "demo" && password == "demo")
		      return new DemoUserIdentity { UserName = username };

         // Not recognised => anonymous.
		   return null;
		}
	}
}
﻿namespace Nancy.Demo.Authentication.Basic
{
    using Nancy.Authentication.Basic;
    using Nancy.Security;

    public class UserValidator : IUserValidator
    {
        public IUserIdentity Validate(string username, string password)
        {
            if (username == "demo" && password == "demo")
            {
                return new DemoUserIdentity { UserName = username };
            }

            // Not recognised => anonymous.
            return null;
        }
    }
}

Fix indentation; add braces around single-line if.
Fix indentation; add braces around single-line if.
