public LoginController(IConfiguration config, ILogger <LoginController> logger) { _logger = logger; this.loginService = new Services.LoginService(config, _logger); //this.IdentityAccessService = new Services.IdentityAccessService(config); }
public ActionResult RegistrationUserProfile(UserModel model) { List <SelectListItem> items = new List <SelectListItem>(); items.Add(new SelectListItem() { Text = "Admin", Value = "1", Selected = true }); items.Add(new SelectListItem() { Text = "Supervisor", Value = "2" }); items.Add(new SelectListItem() { Text = "Agent", Value = "3" }); ViewBag.UserType = items; string Message = null; if (model != null) { model.CreatedBy = new UserSetting().UserId; model.CreatedDate = DateTime.Now; ApiResponse <string> login = new Services.LoginService().CreateUser(model); } else { Message = "Please Fill all Data"; } ViewBag.Message = Message; return(View(model)); }
public HomeController(DbContext.CHISEntitiesSqlServer db , Services.LoginService loginSvr, Services.WeChatService weChatSvr, Services.DoctorService docSvr ) : base(db) { _loginSvr = loginSvr; _weChatSvr = weChatSvr; _docSvr = docSvr; }
public DiagnosisController(OAuthService jwtAuth , Services.LoginService loginSvr , Services.TreatService treatSvr , Services.DictService dicSvr) { _jwtAuth = jwtAuth; _loginSvr = loginSvr; _dicSvr = dicSvr; _treatSvr = treatSvr; }
public NurseController(DbContext.CHISEntitiesSqlServer db , Services.CustomerService cusSvr , Services.WorkStationService staSvr , Services.DoctorService docSvr , Services.LoginService loginSvr , Services.RxService rxSvr ) : base(db) { _cusSvr = cusSvr; _staSvr = staSvr; _docSvr = docSvr; _loginSvr = loginSvr; _rxSvr = rxSvr; }
/// <summary> /// Password_Credentials_Grant方式 /// </summary> /// <param name="context"></param> /// <returns></returns> public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context) { if (string.IsNullOrWhiteSpace(context.Request.Query["domain"])) { await base.GrantResourceOwnerCredentials(context); } var loginService = new Services.LoginService(context.Request.Query["domain"], context.UserName, context.Password); if (loginService.Login()) { var oAuthIdentity = new ClaimsIdentity(context.Options.AuthenticationType); oAuthIdentity.AddClaim(new Claim(ClaimTypes.Name, context.UserName)); var ticket = new AuthenticationTicket(oAuthIdentity, new AuthenticationProperties()); context.Validated(ticket); } await base.GrantResourceOwnerCredentials(context); }
public ActionResult Login(UserLoginModel model) { string Message = null; if (model != null && model.Email != null && model.Password != null) { ApiResponse <UserLoginModel> login = new Services.LoginService().Login(model); if (login.Status && login.Data != null) { Session["UserDetail"] = login.Data; return(RedirectToAction("Index", "Home")); } else { Message = "User Id or Password wrong."; } } else { Message = "Please enter UserId/Password"; } ViewBag.Message = Message; return(View()); }
public Login() { InitializeComponent(); _service = new Services.LoginService(); }
public AccountController() { _service = new Services.LoginService(); }
public LoginController() { this.userLoginService = new Services.LoginService(); this.IdentityAccessService = new Services.IdentityAccessService(); }