Exemplo n.º 1
0
 public UserController(IUserApplicationService service, IPersonApplicationService servicePerson, IRoleApplicationService serviceRole, IAddressApplicationService serviceAddress, IPhoneApplicationService servicePhone)
 {
     this._service = service;
     this._servicePerson = servicePerson;
     this._serviceRole = serviceRole;
     this._serviceAddress = serviceAddress;
     this._servicePhone = servicePhone;
 }
Exemplo n.º 2
0
 public UserController(IUserApplicationService service, IPersonApplicationService servicePerson, IRoleApplicationService serviceRole, IAddressApplicationService serviceAddress, IPhoneApplicationService servicePhone)
 {
     this._service        = service;
     this._servicePerson  = servicePerson;
     this._serviceRole    = serviceRole;
     this._serviceAddress = serviceAddress;
     this._servicePhone   = servicePhone;
 }
Exemplo n.º 3
0
        public void SetUp()
        {
            _roleService = IoC.Resolve <IRoleApplicationService>();

            using (var uow = IoC.Resolve <IUnitOfWork>())
            {
                RoleInitialDataBuilder.Build(uow);
            }
        }
Exemplo n.º 4
0
        public void SetUp()
        {
            base.SetUp();

            _sessionFactory = ApplicationContext.Current["NHibernateSessionFactory"] as ISessionFactory;

            _audienceApplicationService = ApplicationContext.Current["AudienceApplicationService"] as IAudienceApplicationService;

            _userApplicationService = ApplicationContext.Current["UserApplicationService"] as IUserApplicationService;

            _roleApplicationService = ApplicationContext.Current["RoleApplicationService"] as IRoleApplicationService;

            _permissionApplicationService = ApplicationContext.Current["PermissionApplicationService"] as IPermissionApplicationService;

            _rolePermissionApplicationService = ApplicationContext.Current["RolePermissionApplicationService"] as IRolePermissionApplicationService;
        }
Exemplo n.º 5
0
        public void ConfigureOAuth(IAppBuilder app, IUserApplicationService userService, IRoleApplicationService roleService)
        {
            //app.CreatePerOwinContext(AppDataContext.Create);
            //app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
            OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions()
            {
                AllowInsecureHttp = true,
                TokenEndpointPath = new PathString("/api/security/token"),
                AccessTokenExpireTimeSpan = TimeSpan.FromDays(2),
                Provider = new SimpleAuthorizationServerProvider(userService, roleService)
            };

            // Token Generation
            app.UseOAuthAuthorizationServer(OAuthServerOptions);
            app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
        }
 public SimpleAuthorizationServerProvider(IUserApplicationService userService, IRoleApplicationService roleService)
 {
     this._userService = userService;
     this._roleService = roleService;
 }
Exemplo n.º 7
0
 public RoleController(IRoleApplicationService roleApplicationService)
 {
     _roleApplicationService = roleApplicationService;
 }
 public SimpleAuthorizationServerProvider(IUserApplicationService userService, IRoleApplicationService roleService)
 {
     this._userService = userService;
     this._roleService = roleService;
 }
Exemplo n.º 9
0
        public void ConfigureOAuth(IAppBuilder app, IUserApplicationService userService, IRoleApplicationService roleService)
        {
            //app.CreatePerOwinContext(AppDataContext.Create);
            //app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
            OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions()
            {
                AllowInsecureHttp         = true,
                TokenEndpointPath         = new PathString("/api/security/token"),
                AccessTokenExpireTimeSpan = TimeSpan.FromDays(2),
                Provider = new SimpleAuthorizationServerProvider(userService, roleService)
            };

            // Token Generation
            app.UseOAuthAuthorizationServer(OAuthServerOptions);
            app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
        }
Exemplo n.º 10
0
 public HomeController(IRoleApplicationService _roleSerivce)
 {
     this.roleService = _roleSerivce;
 }
Exemplo n.º 11
0
 public HomeController(IUserApplicationService serviceUser, IRoleApplicationService serviceRole)
 {
     this._serviceUser = serviceUser;
     this._serviceRole = serviceRole;
 }
Exemplo n.º 12
0
 public UserStore(IUnitOfWork unitOfWork, IUserApplicationService userApplicationService, IRoleApplicationService roleApplicationService)
 {
     _unitOfWork             = unitOfWork;
     _userApplicationService = userApplicationService;
     _roleApplicationService = roleApplicationService;
 }
Exemplo n.º 13
0
 public RoleController(IRoleApplicationService applicationService)
 {
     this.applicationService = applicationService;
 }
Exemplo n.º 14
0
 public RoleController(IRoleApplicationService applicationService)
 {
     this.applicationService = applicationService;
 }
Exemplo n.º 15
0
 public PermissionsController(IRoleApplicationService roleApplicationService, IUserApplicationService userApplicationService, IDomainNotificationHandler domainNotificationHandler)
     : base(domainNotificationHandler)
 {
     _roleApplicationService = roleApplicationService;
     _userApplicationService = userApplicationService;
 }
Exemplo n.º 16
0
 public HomeController(IUserApplicationService serviceUser, IRoleApplicationService serviceRole)
 {
     this._serviceUser = serviceUser;
     this._serviceRole = serviceRole;
 }
Exemplo n.º 17
0
 public static IEnumerable <IRoleState> GetByProperty <TPropertyType>(this IRoleApplicationService applicationService,
                                                                      System.Linq.Expressions.Expression <Func <IRoleState, TPropertyType> > propertySelector,
                                                                      TPropertyType propertyValue, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue)
 {
     return(applicationService.GetByProperty(ReflectUtils.GetPropertyName <IRoleState, TPropertyType>(propertySelector), propertyValue, orders, firstResult, maxResults));
 }