public AccountController() { usuarioAreaService = usuarioAreaService ?? new UsuarioAreaService(); usuarioEmpresaService = usuarioEmpresaService ?? new UsuarioEmpresaService(); moduloRolService = moduloRolService ?? new ModuloRolService(); catalagoService = catalagoService ?? new CatalogoService(); directorioActivo = directorioActivo ?? new LDAP(); objInjUserRol = objInjUserRol ?? new AspNetUserRolesService(); }
public ApplicationOAuthProvider(string publicClientId, ILDAP dau) { directorioActivo = dau; if (publicClientId == null) { throw new ArgumentNullException("publicClientId"); } _publicClientId = publicClientId; }
public AccountController(IUsuarioAreaService svcusuarioAreaService, IUsuarioEmpresaService svcusuarioEmpresaService, IModuloRolService svcmoduloRolService, ICatalogoService catServ, ILDAP dau, IAspNetUserRolesService userRole) { usuarioAreaService = svcusuarioAreaService; usuarioEmpresaService = svcusuarioEmpresaService; moduloRolService = svcmoduloRolService; catalagoService = catServ; directorioActivo = dau; objInjUserRol = userRole; }
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 public void ConfigureAuth(IAppBuilder app) { // Configure the db context and user manager to use a single instance per request app.CreatePerOwinContext(ApplicationDbContext.Create); app.CreatePerOwinContext <ApplicationUserManager>(ApplicationUserManager.Create); app.CreatePerOwinContext <ApplicationRoleManager>(ApplicationRoleManager.Create); // Enable the application to use a cookie to store information for the signed in user // and to use a cookie to temporarily store information about a user logging in with a third party login provider app.UseCookieAuthentication(new CookieAuthenticationOptions()); app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); // Configure the application for OAuth based flow PublicClientId = "self"; dau = new Services.Implementations.Business.LDAP(); OAuthOptions = new OAuthAuthorizationServerOptions { TokenEndpointPath = new PathString("/api/oauth/token"), Provider = new ApplicationOAuthProvider(PublicClientId, dau), AuthorizeEndpointPath = new PathString("/api/Account/ExternalLogin"), AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(50000), RefreshTokenProvider = new RefreshTokenProvider(), // In production mode set AllowInsecureHttp = false AllowInsecureHttp = true }; // Enable the application to use bearer tokens to authenticate users app.UseOAuthBearerTokens(OAuthOptions); // Uncomment the following lines to enable logging in with third party login providers //app.UseMicrosoftAccountAuthentication( // clientId: "", // clientSecret: ""); //app.UseTwitterAuthentication( // consumerKey: "", // consumerSecret: ""); //app.UseFacebookAuthentication( // appId: "", // appSecret: ""); //app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() //{ // ClientId = "", // ClientSecret = "" //}); }
/// <summary> /// Este contructor se implemento, con un intento para resolver el problema del IIS /// en el servidor de banistmo 10.71.27.116 /// </summary> public UserController() { userService = new UserService(); reporteSrv = new ReporteService(); rrmService = new ReporteRolesMenuService(); usuarioAreaService = new UsuarioAreaService(); usuarioEmpresaService = new UsuarioEmpresaService(); catalagoService = new CatalogoService(); directorioactivo = new LDAP(); usrRolService = new UsuariosPorRolService(); AspNetUserRolesService = new AspNetUserRolesService(); rolService = rolService ?? new RolService(); areaOperativaService = areaOperativaService ?? new AreaOperativaService(); RegConSrv = new RegistroControlService(); }
public UserController(IUserService usr, IReporteService reporte, IReporteRolesMenuService rrmSrv, IUsuarioAreaService usrAreaSrv, IUsuarioEmpresaService usrEmpSrv, ICatalogoService catSrv, ILDAP dau, IUsuariosPorRoleService usrRol, IAspNetUserRolesService aspNetUserRolesServ, IAreaOperativaService area, IRegistroControlService RegControlSrv) { userService = usr; reporteSrv = reporte; rrmService = rrmSrv; usuarioAreaService = usrAreaSrv; usuarioEmpresaService = usrEmpSrv; catalagoService = catSrv; directorioactivo = dau; usrRolService = usrRol; AspNetUserRolesService = aspNetUserRolesServ; rolService = rolService ?? new RolService(); areaOperativaService = area; RegConSrv = RegControlSrv; }
public ApplicationOAuthProvider(ILDAP dau) { directorioActivo = dau; }