public UserService(ISSOService ssoService, IRepositoryCommand <User, long> userCommandRepo, IRepositoryQuery <User, long> userQueryRepo, IRepositoryCommand <UserRole, long> userRoleCommandRepo, IRepositoryQuery <UserRole, long> userRoleQueryRepo, IRepositoryQuery <Role, long> roleQueryRepo, IRepositoryQuery <Company, long> companyQueryRepo, IEmailService emailService, IMapper mapper, IOptions <SSoSetting> sSoSetting, IHttpContextExtensionService httpContext) { _ssoSettings = sSoSetting.Value; _ssoService = ssoService; _userCommandRepo = userCommandRepo; _userQueryRepo = userQueryRepo; _userRoleCommandRepo = userRoleCommandRepo; _roleQueryRepo = roleQueryRepo; _companyQueryRepo = companyQueryRepo; _emailService = emailService; _mapper = mapper; _userRoleQueryRepo = userRoleQueryRepo; _httpContext = httpContext; CurrentUserId = _httpContext.GetCurrentSSOUserId(); }
private void RegisterServices() { WebService = new WebService(); LoginService = new LoginService(); PushService = DependencyService.Get <IPushService>(); SsoService = DependencyService.Get <ISSOService>(); }
public App() { mainSite = new Site(); mainSite.name = "Pleio hoofdniveau"; mainSite.url = Constants.Url; currentSite = mainSite; webService = new WebService(); loginService = new LoginService(); pushService = DependencyService.Get <IPushService> (); ssoService = DependencyService.Get <ISSOService> (); RootPage = new MainPage(); MainPage = RootPage; LoadAccessToken(); pushService.SetBadgeNumber(0); MessagingCenter.Subscribe <Xamarin.Forms.Application> (App.Current, "refresh_access_token", async(sender) => { await RefreshToken(); }); MessagingCenter.Subscribe <Xamarin.Forms.Application> (App.Current, "login", async(sender) => { ShowLogin(); }); MessagingCenter.Subscribe <Xamarin.Forms.Application> (App.Current, "login_succesful", async(sender) => { RefreshPushToken(); }); }
public Guid?GetSessionID(string userID, string vendor, string ipAddress) { AuthnRequestType auth = SSOTools.CreateAuthnRequest(userID, vendor, ipAddress); auth.Signature = SSOTools.Sign(auth, auth.ID, _clientCertificate); ChannelFactory <ISSOService> channelFactory = new ChannelFactory <ISSOService>("BasicHttpBinding_ISSOService"); ISSOService ssoClient = channelFactory.CreateChannel(); ResponseType r = ssoClient.GetSSO(new GetSSORequest { AuthnRequest = auth }).Response; channelFactory.Close(); if (SSOTools.VerifySignature(r, _serverCertificate)) { Dictionary <string, string> attributes = SSOTools.GetAttributes(r); Guid cleverDomeSessionGuid = new Guid(attributes["SessionID"]); //int timeOut = int.Parse(attributes["SessionTimeOut"]); // Time Out of the session. return(cleverDomeSessionGuid); } else { return(null); } }
private void RegisterServices() { WebService = new WebService(); LoginService = new LoginService(); PushService = DependencyService.Get<IPushService>(); SsoService = DependencyService.Get<ISSOService>(); }
public AuthService( IRepositoryQuery <User, long> userQueryRepo, IRepositoryCommand <User, long> userCommandRepo, ISSOService ssoService, IUserService userService, IEmailService emailService, IHttpContextExtensionService httpContextExtensionService) { _httpContextService = httpContextExtensionService; _ssoService = ssoService; _userService = userService; _emailService = emailService; _userQueryRepo = userQueryRepo; _userCommandRepo = userCommandRepo; }
public AccountController(ISSOService ssoService) { this.ssoService = ssoService; }