/// <summary>
		/// ctor the Mighty
		/// </summary>
		public AuthController(IUnitOfWorkFactory<BrewgrContext> unitOfWorkFactory, IUserLoginService userLoginService, 
			IAuthenticationService authService, IUserResolver userResolver, IOAuthService oAuthService, IUserService userService,
			IFacebookConnectSettings facebookConnectSettings, IEmailSender emailSender,
			IEmailMessageFactory emailMessageFactory)
		{
			this.UnitOfWorkFactory = unitOfWorkFactory;
			this.UserLoginService = userLoginService;
			this.AuthenticationService = authService;
			this.UserResolver = userResolver;
			this.OAuthService = oAuthService;
			this.UserService = userService;
			this.FacebookConnectSettings = facebookConnectSettings;
			this.EmailSender = emailSender;
			this.EmailMessageFactory = emailMessageFactory;
		}
Example #2
0
 /// <summary>
 /// ctor the Mighty
 /// </summary>
 public AuthController(IUnitOfWorkFactory <BrewgrContext> unitOfWorkFactory, IUserLoginService userLoginService,
                       IAuthenticationService authService, IUserResolver userResolver, IOAuthService oAuthService, IUserService userService,
                       IFacebookConnectSettings facebookConnectSettings, IEmailSender emailSender,
                       IEmailMessageFactory emailMessageFactory)
 {
     this.UnitOfWorkFactory       = unitOfWorkFactory;
     this.UserLoginService        = userLoginService;
     this.AuthenticationService   = authService;
     this.UserResolver            = userResolver;
     this.OAuthService            = oAuthService;
     this.UserService             = userService;
     this.FacebookConnectSettings = facebookConnectSettings;
     this.EmailSender             = emailSender;
     this.EmailMessageFactory     = emailMessageFactory;
 }
Example #3
0
        public bool UserIsValid(IFacebookUser facebookUser, IFacebookConnectSettings settings, out IEnumerable <FacebookConnectValidationKey> errors)
        {
            var errorsList = new List <FacebookConnectValidationKey>();


            if (!this.IsAuthenticated())
            {
                errorsList.Add(FacebookConnectValidationKey.NotAuthenticated);
            }
            if (settings.OnlyAllowVerified && !facebookUser.IsVerified)
            {
                errorsList.Add(FacebookConnectValidationKey.NotVerified);
            }

            errors = errorsList;

            return(errorsList.Count == 0);
        }
Example #4
0
 /// <summary>
 /// ctor the Mighty
 /// </summary>
 public RootController(IUnitOfWorkFactory <BrewgrContext> unitOfWorkFactory, IUserLoginService userLoginService,
                       IAuthenticationService authService, IUserResolver userResolver, IOAuthService oAuthService, IUserService userService,
                       ISearchService searchService, IFacebookConnectSettings facebookConnectSettings, IMarketingService marketingService,
                       IRecipeService recipeService, IEmailMessageFactory emailMessageFactory, IEmailSender emailSender, ISeoSitemap seoSitemap)
 {
     this.UnitOfWorkFactory       = unitOfWorkFactory;
     this.UserLoginService        = userLoginService;
     this.AuthService             = authService;
     this.UserResolver            = userResolver;
     this.OAuthService            = oAuthService;
     this.UserService             = userService;
     this.SearchService           = searchService;
     this.FacebookConnectSettings = facebookConnectSettings;
     this.MarketingService        = marketingService;
     this.RecipeService           = recipeService;
     this.EmailMessageFactory     = emailMessageFactory;
     this.EmailSender             = emailSender;
     this.SeoSitemap = seoSitemap;
 }
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public RootController(IUnitOfWorkFactory<BrewgrContext> unitOfWorkFactory, IUserLoginService userLoginService, 
			IAuthenticationService authService, IUserResolver userResolver, IOAuthService oAuthService, IUserService userService,
			ISearchService searchService, IFacebookConnectSettings facebookConnectSettings, IMarketingService marketingService,
			IRecipeService recipeService, IEmailMessageFactory emailMessageFactory, IEmailSender emailSender, ISeoSitemap seoSitemap)
		{
			this.UnitOfWorkFactory = unitOfWorkFactory;
			this.UserLoginService = userLoginService;
			this.AuthService = authService;
			this.UserResolver = userResolver;
			this.OAuthService = oAuthService;
			this.UserService = userService;
			this.SearchService = searchService;
			this.FacebookConnectSettings = facebookConnectSettings;
			this.MarketingService = marketingService;
			this.RecipeService = recipeService;
			this.EmailMessageFactory = emailMessageFactory;
			this.EmailSender = emailSender;
			this.SeoSitemap = seoSitemap;
		}
		/// <summary>
		/// ctor the Mighty
		/// </summary>
		public DefaultFacebookService(IFacebookConnectSettings facebookConnectSettings)
		{
			this.FacebookConnectSettings = facebookConnectSettings;
		}
 /// <summary>
 /// ctor the Mighty
 /// </summary>
 public DefaultFacebookService(IFacebookConnectSettings facebookConnectSettings)
 {
     this.FacebookConnectSettings = facebookConnectSettings;
 }
        public bool UserIsValid(IFacebookUser facebookUser, IFacebookConnectSettings settings, out IEnumerable<FacebookConnectValidationKey> errors)
        {
            var errorsList = new List<FacebookConnectValidationKey>();

            if (!this.IsAuthenticated()) errorsList.Add(FacebookConnectValidationKey.NotAuthenticated);
            if (settings.OnlyAllowVerified && !facebookUser.IsVerified) errorsList.Add(FacebookConnectValidationKey.NotVerified);

            errors = errorsList;

            return errorsList.Count == 0;
        }