public AuthorizationProcesser(IPrincipal user, IAuthorizeAnEntity authProvider, params string[] allowedRoles)
        {
            if (user == null)
            {
                throw new Exception("IPrincipal cannot be null.");
            }

            if (authProvider == null)
            {
                throw new Exception("IAuthorizeAnEntity cannot be null.");
            }

            User = user;
            AuthorizationProvider = authProvider;
            RoleWhiteList         = allowedRoles;
        }
 public AuthorizedDbContextProvider(IPrincipal user, IAuthorizeAnEntity roleProvider, params string[] allowedRoles)
     : base(new AuthorizationProcesser(user, roleProvider, allowedRoles))
 {
 }