示例#1
0
		/// <summary>
		/// Records the feature and dependency use.
		/// </summary>
		/// <param name="value">The consumer or service provider.</param>
		/// <param name="service">The service.</param>
		/// <param name="tokenManager">The token manager.</param>
		/// <param name="nonceStore">The nonce store.</param>
		internal static void RecordFeatureAndDependencyUse(object value, ServiceProviderDescription service, ITokenManager tokenManager, INonceStore nonceStore) {
			Contract.Requires(value != null);
			Contract.Requires(service != null);
			Contract.Requires(tokenManager != null);

			// In release builds, just quietly return.
			if (value == null || service == null || tokenManager == null) {
				return;
			}

			if (Reporting.Enabled && Reporting.Configuration.IncludeFeatureUsage) {
				StringBuilder builder = new StringBuilder();
				builder.Append(value.GetType().Name);
				builder.Append(" ");
				builder.Append(tokenManager.GetType().Name);
				if (nonceStore != null) {
					builder.Append(" ");
					builder.Append(nonceStore.GetType().Name);
				}
				builder.Append(" ");
				builder.Append(service.Version);
				builder.Append(" ");
				builder.Append(service.UserAuthorizationEndpoint);
				Reporting.ObservedFeatures.Add(builder.ToString());
				Reporting.Touch();
			}
		}
示例#2
0
 public void Init() {
     var builder = new ContainerBuilder();
     builder.RegisterType<TokenManager>().As<ITokenManager>();
     builder.RegisterType<TestTokenProvider>().As<ITokenProvider>();
     _container = builder.Build();
     _tokenManager = _container.Resolve<ITokenManager>();
 }
示例#3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OAuthChannel"/> class.
        /// </summary>
        /// <param name="signingBindingElement">The binding element to use for signing.</param>
        /// <param name="store">The web application store to use for nonces.</param>
        /// <param name="tokenManager">The token manager instance to use.</param>
        /// <param name="isConsumer">A value indicating whether this channel is being constructed for a Consumer (as opposed to a Service Provider).</param>
        internal OAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, ITokenManager tokenManager, bool isConsumer)
            : this(signingBindingElement,
			store,
			tokenManager,
			isConsumer ? (IMessageFactory)new OAuthConsumerMessageFactory() : new OAuthServiceProviderMessageFactory(tokenManager))
        {
        }
示例#4
0
		/// <summary>
		/// Records the feature and dependency use.
		/// </summary>
		/// <param name="value">The consumer or service provider.</param>
		/// <param name="service">The service.</param>
		/// <param name="tokenManager">The token manager.</param>
		/// <param name="nonceStore">The nonce store.</param>
		internal static void RecordFeatureAndDependencyUse(object value, ServiceProviderHostDescription service, ITokenManager tokenManager, INonceStore nonceStore) {
			Requires.NotNull(value, "value");
			Requires.NotNull(service, "service");
			Requires.NotNull(tokenManager, "tokenManager");

			// In release builds, just quietly return.
			if (value == null || service == null || tokenManager == null) {
				return;
			}

			if (Reporting.Enabled && Reporting.Configuration.IncludeFeatureUsage) {
				StringBuilder builder = new StringBuilder();
				builder.Append(value.GetType().Name);
				builder.Append(" ");
				builder.Append(tokenManager.GetType().Name);
				if (nonceStore != null) {
					builder.Append(" ");
					builder.Append(nonceStore.GetType().Name);
				}
				builder.Append(" ");
				builder.Append(service.UserAuthorizationEndpoint != null ? service.UserAuthorizationEndpoint.Location.AbsoluteUri : string.Empty);
				Reporting.ObservedFeatures.Add(builder.ToString());
				Reporting.Touch();
			}
		}
 public CicloStationsManager(IHttpCommunicator httpCommunicator, ITokenManager tokenManager)
 {
     _httpCommunicator = httpCommunicator;
     _tokenManager = tokenManager;
     var loader = new Windows.ApplicationModel.Resources.ResourceLoader();
     fileName = loader.GetString("CicloStationFile");
 }
        public UserFunctionManager(IUserFunctionRepository userFunctionRepository, IFunctionRepository functionRepository, ITokenManager tokenManager)
        {
            _userFunctionRepository = userFunctionRepository;
            _functionRepository = functionRepository;
            _tokenManager = tokenManager;

            _functions = new Dictionary<FunctionIdentityName, Func<Guid, bool>>();  // No items now
        }
示例#7
0
		/// <summary>
		/// Initializes a new instance of the <see cref="OAuthChannel"/> class.
		/// </summary>
		/// <param name="signingBindingElement">The binding element to use for signing.</param>
		/// <param name="store">The web application store to use for nonces.</param>
		/// <param name="tokenManager">The ITokenManager instance to use.</param>
		/// <param name="messageTypeProvider">
		/// An injected message type provider instance.
		/// Except for mock testing, this should always be one of
		/// <see cref="OAuthConsumerMessageFactory"/> or <see cref="OAuthServiceProviderMessageFactory"/>.
		/// </param>
		internal OAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, ITokenManager tokenManager, IMessageFactory messageTypeProvider)
			: base(messageTypeProvider, InitializeBindingElements(signingBindingElement, store, tokenManager)) {
			Contract.Requires<ArgumentNullException>(tokenManager != null);
			Contract.Requires<ArgumentNullException>(signingBindingElement != null);
			Contract.Requires<ArgumentException>(signingBindingElement.SignatureCallback == null, OAuthStrings.SigningElementAlreadyAssociatedWithChannel);

			this.TokenManager = tokenManager;
			signingBindingElement.SignatureCallback = this.SignatureCallback;
		}
示例#8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OAuthChannel"/> class.
        /// </summary>
        /// <param name="signingBindingElement">The binding element to use for signing.</param>
        /// <param name="store">The web application store to use for nonces.</param>
        /// <param name="tokenManager">The ITokenManager instance to use.</param>
        /// <param name="messageTypeProvider">
        /// An injected message type provider instance.
        /// Except for mock testing, this should always be one of
        /// <see cref="OAuthConsumerMessageFactory"/> or <see cref="OAuthServiceProviderMessageFactory"/>.
        /// </param>
        internal OAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, ITokenManager tokenManager, IMessageFactory messageTypeProvider)
            : base(messageTypeProvider, InitializeBindingElements(signingBindingElement, store, tokenManager))
        {
            ErrorUtilities.VerifyArgumentNotNull(tokenManager, "tokenManager");

            this.TokenManager = tokenManager;
            ErrorUtilities.VerifyArgumentNamed(signingBindingElement.SignatureCallback == null, "signingBindingElement", OAuthStrings.SigningElementAlreadyAssociatedWithChannel);

            signingBindingElement.SignatureCallback = this.SignatureCallback;
        }
示例#9
0
		protected OAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, ITokenManager tokenManager, SecuritySettings securitySettings, IMessageFactory messageTypeProvider, IChannelBindingElement[] bindingElements)
			: base(messageTypeProvider, bindingElements) {
			Requires.NotNull(tokenManager, "tokenManager");
			Requires.NotNull(securitySettings, "securitySettings");
			Requires.NotNull(signingBindingElement, "signingBindingElement");
			Requires.That(signingBindingElement.SignatureCallback == null, "signingBindingElement", OAuthStrings.SigningElementAlreadyAssociatedWithChannel);
			Requires.NotNull(bindingElements, "bindingElements");

			this.TokenManager = tokenManager;
			signingBindingElement.SignatureCallback = this.SignatureCallback;
		}
		/// <summary>
		/// Initializes the binding elements for the OAuth channel.
		/// </summary>
		/// <param name="signingBindingElement">The signing binding element.</param>
		/// <param name="store">The nonce store.</param>
		/// <param name="tokenManager">The token manager.</param>
		/// <param name="securitySettings">The security settings.</param>
		/// <returns>
		/// An array of binding elements used to initialize the channel.
		/// </returns>
		private static IChannelBindingElement[] InitializeBindingElements(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, ITokenManager tokenManager, SecuritySettings securitySettings) {
			Requires.NotNull(securitySettings, "securitySettings");

			var bindingElements = OAuthChannel.InitializeBindingElements(signingBindingElement, store);

			var spTokenManager = tokenManager as IServiceProviderTokenManager;
			var serviceProviderSecuritySettings = securitySettings as ServiceProviderSecuritySettings;
			bindingElements.Insert(0, new TokenHandlingBindingElement(spTokenManager, serviceProviderSecuritySettings));

			return bindingElements.ToArray();
		}
        public void SetUp()
        {
            var userManager = new Mock<IUserManager>();
            userManager.Setup(x => x.AuthenticateUserAsync(It.IsAny<string>()))
                .ReturnsAsync(new SentinelPrincipal(
                        new SentinelIdentity(
                            AuthenticationType.OAuth,
                            new SentinelClaim(ClaimTypes.Name, "azzlack"),
                            new SentinelClaim(ClaimType.Client, "NUnit"))));

            this.tokenManager = new TokenManager(LogManager.GetLogger<TokenManagerTests>(), userManager.Object, new PrincipalProvider(new PBKDF2CryptoProvider()), new PBKDF2CryptoProvider(), new TokenFactory(), new MemoryTokenRepository());
        }
示例#12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OAuthChannel"/> class.
        /// </summary>
        /// <param name="signingBindingElement">The binding element to use for signing.</param>
        /// <param name="store">The web application store to use for nonces.</param>
        /// <param name="tokenManager">The ITokenManager instance to use.</param>
        /// <param name="messageTypeProvider">
        /// An injected message type provider instance.
        /// Except for mock testing, this should always be one of
        /// <see cref="OAuthConsumerMessageFactory"/> or <see cref="OAuthServiceProviderMessageFactory"/>.
        /// </param>
        /// <remarks>
        /// This overload for testing purposes only.
        /// </remarks>
        internal OAuthChannel(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, ITokenManager tokenManager, IMessageFactory messageTypeProvider)
            : base(messageTypeProvider, new OAuthHttpMethodBindingElement(), signingBindingElement, new StandardExpirationBindingElement(), new StandardReplayProtectionBindingElement(store))
        {
            if (tokenManager == null) {
                throw new ArgumentNullException("tokenManager");
            }

            this.TokenManager = tokenManager;
            ErrorUtilities.VerifyArgumentNamed(signingBindingElement.SignatureCallback == null, "signingBindingElement", OAuthStrings.SigningElementAlreadyAssociatedWithChannel);

            signingBindingElement.SignatureCallback = this.SignatureCallback;
        }
 public Detalle_Contactos_EmpresaController(IDetalle_Contactos_EmpresaService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Contactos_EmpresaApiConsumer Detalle_Contactos_EmpresaApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, Iareas_EmpresasApiConsumer areas_EmpresasApiConsumer, IEstatusApiConsumer EstatusApiConsumer, ISpartan_UserApiConsumer Spartan_UserApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer            = authenticationApiConsumer;
     this._IDetalle_Contactos_EmpresaApiConsumer = Detalle_Contactos_EmpresaApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._Iareas_EmpresasApiConsumer                  = areas_EmpresasApiConsumer;
     this._IEstatusApiConsumer                         = EstatusApiConsumer;
     this._ISpartan_UserApiConsumer                    = Spartan_UserApiConsumer;
 }
示例#14
0
 public Detalle_de_Servicios_PericialesController(IDetalle_de_Servicios_PericialesService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_de_Servicios_PericialesApiConsumer Detalle_de_Servicios_PericialesApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IServicios_PericialesApiConsumer Servicios_PericialesApiConsumer, IEstatus_del_DictamenApiConsumer Estatus_del_DictamenApiConsumer, IRol_de_DiligenciaApiConsumer Rol_de_DiligenciaApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_de_Servicios_PericialesApiConsumer = Detalle_de_Servicios_PericialesApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IServicios_PericialesApiConsumer            = Servicios_PericialesApiConsumer;
     this._IEstatus_del_DictamenApiConsumer            = Estatus_del_DictamenApiConsumer;
     this._IRol_de_DiligenciaApiConsumer               = Rol_de_DiligenciaApiConsumer;
 }
示例#15
0
        static TokenmanagerSingleton()
        {
            var last = Registrer.Register("pacmanclient.dll", "248DD447-4295-4888-BC5A-5D87F3705F74");
            var c    = new TokenManager();
            var i    = (ITokenManager)c;

            var info = Phone.TaskHost.GetCurrenHostInfo(); //info => COM hack throughpassed

            Instance = i;

            //Guid productId = new Guid(info.szProductId); // native decompile of "return this._hostInformation.szProductId;"
            //Instance.GetAppIDFromProductID(productId, out myAppId);
            myAppId = GetAppIDFromProductID(new Guid(info.szProductId));
        }
示例#16
0
 public Detalle_Planes_AlimenticiosController(IDetalle_Planes_AlimenticiosService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Planes_AlimenticiosApiConsumer Detalle_Planes_AlimenticiosApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ITiempos_de_ComidaApiConsumer Tiempos_de_ComidaApiConsumer, IDias_de_la_semanaApiConsumer Dias_de_la_semanaApiConsumer, IPlatillosApiConsumer PlatillosApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_Planes_AlimenticiosApiConsumer = Detalle_Planes_AlimenticiosApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ITiempos_de_ComidaApiConsumer               = Tiempos_de_ComidaApiConsumer;
     this._IDias_de_la_semanaApiConsumer               = Dias_de_la_semanaApiConsumer;
     this._IPlatillosApiConsumer                       = PlatillosApiConsumer;
 }
示例#17
0
 public Detalle_Plan_Actos_de_InvestigacionController(IDetalle_Plan_Actos_de_InvestigacionService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Plan_Actos_de_InvestigacionApiConsumer Detalle_Plan_Actos_de_InvestigacionApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ICategoria_de_Servicio_de_ApoyoApiConsumer Categoria_de_Servicio_de_ApoyoApiConsumer, ITipo_de_Servicio_de_ApoyoApiConsumer Tipo_de_Servicio_de_ApoyoApiConsumer, ISpartan_UserApiConsumer Spartan_UserApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_Plan_Actos_de_InvestigacionApiConsumer = Detalle_Plan_Actos_de_InvestigacionApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ICategoria_de_Servicio_de_ApoyoApiConsumer  = Categoria_de_Servicio_de_ApoyoApiConsumer;
     this._ITipo_de_Servicio_de_ApoyoApiConsumer       = Tipo_de_Servicio_de_ApoyoApiConsumer;
     this._ISpartan_UserApiConsumer                    = Spartan_UserApiConsumer;
 }
示例#18
0
 public Detalle_Relaciones_MASCController(IDetalle_Relaciones_MASCService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Relaciones_MASCApiConsumer Detalle_Relaciones_MASCApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IDetalle_de_ImputadoApiConsumer Detalle_de_ImputadoApiConsumer, IDelitoApiConsumer DelitoApiConsumer, IDetalle_de_Datos_GeneralesApiConsumer Detalle_de_Datos_GeneralesApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer          = authenticationApiConsumer;
     this._IDetalle_Relaciones_MASCApiConsumer = Detalle_Relaciones_MASCApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IDetalle_de_ImputadoApiConsumer             = Detalle_de_ImputadoApiConsumer;
     this._IDelitoApiConsumer                          = DelitoApiConsumer;
     this._IDetalle_de_Datos_GeneralesApiConsumer      = Detalle_de_Datos_GeneralesApiConsumer;
 }
示例#19
0
 public NoticesService(IMessageRepository messageRepository, IAuthorizationService authorizationService,
     ITokenManager tokenManager, IUserRepository userRepository, ITwoSideShowingHandler<MessageStorageModel> messageShowingHandler, IClinicRepository clinicRepository, IClinicUserRepository clinicUserRepository, IHospitalManager hospitalManager, IDischargeRepository dischargeRepository, IClinicManager clinicManager)
 {
     this._messageRepository = messageRepository;
     _authorizationService = authorizationService;
     _tokenManager = tokenManager;
     _userRepository = userRepository;
     this._messageShowingHandler = messageShowingHandler;
     _clinicRepository = clinicRepository;
     _clinicUserRepository = clinicUserRepository;
     _hospitalManager = hospitalManager;
     _dischargeRepository = dischargeRepository;
     _clinicManager = clinicManager;
 }
示例#20
0
 public Spartan_Traduction_Object_TypeController(ISpartan_Traduction_Object_TypeService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, ISpartan_Traduction_Object_TypeApiConsumer Spartan_Traduction_Object_TypeApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ISpartan_FormatApiConsumer Spartan_FormatApiConsumer, ISpartan_Format_PermissionsApiConsumer Spartan_Format_PermissionsApiConsumer, IGeneratePDFApiConsumer GeneratePDFApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._ISpartan_Traduction_Object_TypeApiConsumer = Spartan_Traduction_Object_TypeApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ISpartan_FormatApiConsumer                  = Spartan_FormatApiConsumer;
     this._ISpartan_Format_PermissionsApiConsumer      = Spartan_Format_PermissionsApiConsumer;
     this._IGeneratePDFApiConsumer                     = GeneratePDFApiConsumer;
 }
 public Detalle_Pagos_PacienteController(IDetalle_Pagos_PacienteService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Pagos_PacienteApiConsumer Detalle_Pagos_PacienteApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IPlanes_de_SuscripcionApiConsumer Planes_de_SuscripcionApiConsumer, IFormas_de_PagoApiConsumer Formas_de_PagoApiConsumer, IEstatus_de_PagoApiConsumer Estatus_de_PagoApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer         = authenticationApiConsumer;
     this._IDetalle_Pagos_PacienteApiConsumer = Detalle_Pagos_PacienteApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IPlanes_de_SuscripcionApiConsumer           = Planes_de_SuscripcionApiConsumer;
     this._IFormas_de_PagoApiConsumer                  = Formas_de_PagoApiConsumer;
     this._IEstatus_de_PagoApiConsumer                 = Estatus_de_PagoApiConsumer;
 }
示例#22
0
 public Detalle_Registro_Beneficiarios_Titulares_EmpresaController(IDetalle_Registro_Beneficiarios_Titulares_EmpresaService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Registro_Beneficiarios_Titulares_EmpresaApiConsumer Detalle_Registro_Beneficiarios_Titulares_EmpresaApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ISpartan_UserApiConsumer Spartan_UserApiConsumer, IPlanes_de_SuscripcionApiConsumer Planes_de_SuscripcionApiConsumer, IEstatusApiConsumer EstatusApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_Registro_Beneficiarios_Titulares_EmpresaApiConsumer = Detalle_Registro_Beneficiarios_Titulares_EmpresaApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ISpartan_UserApiConsumer                    = Spartan_UserApiConsumer;
     this._IPlanes_de_SuscripcionApiConsumer           = Planes_de_SuscripcionApiConsumer;
     this._IEstatusApiConsumer                         = EstatusApiConsumer;
 }
示例#23
0
 public Spartan_BR_HistoryController(ISpartan_BR_HistoryService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, ISpartan_BR_HistoryApiConsumer Spartan_BR_HistoryApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ISpartan_UserApiConsumer Spartan_UserApiConsumer, ISpartan_BR_StatusApiConsumer Spartan_BR_StatusApiConsumer, ISpartan_BR_Type_HistoryApiConsumer Spartan_BR_Type_HistoryApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer     = authenticationApiConsumer;
     this._ISpartan_BR_HistoryApiConsumer = Spartan_BR_HistoryApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ISpartan_UserApiConsumer                    = Spartan_UserApiConsumer;
     this._ISpartan_BR_StatusApiConsumer               = Spartan_BR_StatusApiConsumer;
     this._ISpartan_BR_Type_HistoryApiConsumer         = Spartan_BR_Type_HistoryApiConsumer;
 }
示例#24
0
 public AuthController(IAccountService accountService,
                       IJwtFactory jwtFactory,
                       IOptions <JwtIssuerOptions> jwtOptions,
                       ILogger <AuthController> logger,
                       ITokenManager tokenManager,
                       IIdentityService identityService)
 {
     _accountService  = accountService;
     _jwtFactory      = jwtFactory;
     _jwtOptions      = jwtOptions.Value;
     _logger          = logger;
     _tokenManager    = tokenManager;
     _identityService = identityService;
 }
        public AccountService(
            IHttpContextAccessor httpContextAccessor,
            ITokenManager tokenManager,
            IJwtHandler jwtHandler,

            IPasswordHasher <User> passwordHasher
            )
        {
            //_db = db;
            _tokenManager        = tokenManager;
            _jwtHandler          = jwtHandler;
            _passwordHasher      = passwordHasher;
            _httpContextAccessor = httpContextAccessor;
        }
示例#26
0
 public UserController(IHttpContextAccessor httpContextAccessor,
                       IQueryableDomainService <User, int> userQueryableDomainService,
                       ICommandDomainServiceAsync <User> userCommandDomainServiceAsync
                       , IExceptionHandler exceptionHandler
                       , IConfiguration configuration
                       , ITokenManager tokenManager)
 {
     _user = httpContextAccessor.HttpContext.User;
     _userQueryableDomainService    = userQueryableDomainService;
     _userCommandDomainServiceAsync = userCommandDomainServiceAsync;
     _exceptionHandler = exceptionHandler;
     _configuration    = configuration;
     _tokenManager     = tokenManager;
 }
 public SpartanChangePasswordAutorizationEstatusController(ISpartanChangePasswordAutorizationEstatusService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, ISpartanChangePasswordAutorizationEstatusApiConsumer SpartanChangePasswordAutorizationEstatusApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ISpartan_FormatApiConsumer Spartan_FormatApiConsumer, ISpartan_Format_PermissionsApiConsumer Spartan_Format_PermissionsApiConsumer, IGeneratePDFApiConsumer GeneratePDFApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._ISpartanChangePasswordAutorizationEstatusApiConsumer = SpartanChangePasswordAutorizationEstatusApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ISpartan_FormatApiConsumer                  = Spartan_FormatApiConsumer;
     this._ISpartan_Format_PermissionsApiConsumer      = Spartan_Format_PermissionsApiConsumer;
     this._IGeneratePDFApiConsumer                     = GeneratePDFApiConsumer;
 }
示例#28
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ConsumerBase"/> class.
        /// </summary>
        /// <param name="serviceDescription">The endpoints and behavior of the Service Provider.</param>
        /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
        protected ConsumerBase(ServiceProviderDescription serviceDescription, ITokenManager tokenManager)
        {
            if (serviceDescription == null) {
                throw new ArgumentNullException("serviceDescription");
            }
            if (tokenManager == null) {
                throw new ArgumentNullException("tokenManager");
            }

            ITamperProtectionChannelBindingElement signingElement = serviceDescription.CreateTamperProtectionElement();
            INonceStore store = new NonceMemoryStore(StandardExpirationBindingElement.DefaultMaximumMessageAge);
            this.OAuthChannel = new OAuthChannel(signingElement, store, tokenManager, new OAuthConsumerMessageFactory());
            this.ServiceProvider = serviceDescription;
        }
示例#29
0
 public Detalle_de_Invitado_de_NotificacionController(IDetalle_de_Invitado_de_NotificacionService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_de_Invitado_de_NotificacionApiConsumer Detalle_de_Invitado_de_NotificacionApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IEstadoApiConsumer EstadoApiConsumer, IMunicipioApiConsumer MunicipioApiConsumer, IColoniaApiConsumer ColoniaApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_de_Invitado_de_NotificacionApiConsumer = Detalle_de_Invitado_de_NotificacionApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IEstadoApiConsumer                          = EstadoApiConsumer;
     this._IMunicipioApiConsumer                       = MunicipioApiConsumer;
     this._IColoniaApiConsumer                         = ColoniaApiConsumer;
     this._IColoniaApiConsumer                         = ColoniaApiConsumer;
 }
示例#30
0
 public Detalle_Horarios_ActividadController(IDetalle_Horarios_ActividadService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Horarios_ActividadApiConsumer Detalle_Horarios_ActividadApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IDetalle_Registro_en_Actividad_EventoApiConsumer Detalle_Registro_en_Actividad_EventoApiConsumer, IParentescos_EmpleadosApiConsumer Parentescos_EmpleadosApiConsumer, ISexoApiConsumer SexoApiConsumer, IEstatus_Reservaciones_ActividadApiConsumer Estatus_Reservaciones_ActividadApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer             = authenticationApiConsumer;
     this._IDetalle_Horarios_ActividadApiConsumer = Detalle_Horarios_ActividadApiConsumer;
     this._userCredential                                   = SessionHelper.UserCredential;
     this._tokenManager                                     = tokenManager;
     this._ISpartane_FileApiConsumer                        = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer                = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer      = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IDetalle_Registro_en_Actividad_EventoApiConsumer = Detalle_Registro_en_Actividad_EventoApiConsumer;
     this._IParentescos_EmpleadosApiConsumer                = Parentescos_EmpleadosApiConsumer;
     this._ISexoApiConsumer                                 = SexoApiConsumer;
     this._IEstatus_Reservaciones_ActividadApiConsumer      = Estatus_Reservaciones_ActividadApiConsumer;
 }
示例#31
0
 public Detalle_de_IngredientesController(IDetalle_de_IngredientesService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_de_IngredientesApiConsumer Detalle_de_IngredientesApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IUnidades_de_MedidaApiConsumer Unidades_de_MedidaApiConsumer, IIngredientesApiConsumer IngredientesApiConsumer, IPresentacionApiConsumer PresentacionApiConsumer, IMarcaApiConsumer MarcaApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer          = authenticationApiConsumer;
     this._IDetalle_de_IngredientesApiConsumer = Detalle_de_IngredientesApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IUnidades_de_MedidaApiConsumer              = Unidades_de_MedidaApiConsumer;
     this._IIngredientesApiConsumer                    = IngredientesApiConsumer;
     this._IPresentacionApiConsumer                    = PresentacionApiConsumer;
     this._IMarcaApiConsumer                           = MarcaApiConsumer;
 }
示例#32
0
        public BucketService(string path, ITokenManager manager, int maxFileSize) : base()
        {
            _path         = path;
            _tokenManager = manager;
            _maxFileSize  = maxFileSize;

            Subscribe("bucket/createBucket", CreateBucket);
            Subscribe("bucket/deleteBucket", DeleteBucket);
            Subscribe("bucket/listBucketContent", ListBucketContent);
            Subscribe("bucket/createFolder", CreateFolder);
            Subscribe("bucket/deleteFolder", DeleteFolder);
            Subscribe("bucket/putFile", PutFile);
            Subscribe("bucket/getFile", GetFile);
            Subscribe("bucket/deleteFile", DeleteFile);
        }
示例#33
0
 public Otros_Domicilios_Requeridos_MASCController(IOtros_Domicilios_Requeridos_MASCService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IOtros_Domicilios_Requeridos_MASCApiConsumer Otros_Domicilios_Requeridos_MASCApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IEstadoApiConsumer EstadoApiConsumer, IMunicipioApiConsumer MunicipioApiConsumer, IColoniaApiConsumer ColoniaApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IOtros_Domicilios_Requeridos_MASCApiConsumer = Otros_Domicilios_Requeridos_MASCApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IEstadoApiConsumer                          = EstadoApiConsumer;
     this._IMunicipioApiConsumer                       = MunicipioApiConsumer;
     this._IColoniaApiConsumer                         = ColoniaApiConsumer;
     this._IColoniaApiConsumer                         = ColoniaApiConsumer;
 }
示例#34
0
 public ArticuloController(IArticuloService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IArticuloApiConsumer ArticuloApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ISpartan_FormatApiConsumer Spartan_FormatApiConsumer, ISpartan_Format_PermissionsApiConsumer Spartan_Format_PermissionsApiConsumer, IGeneratePDFApiConsumer GeneratePDFApiConsumer, ISpartan_Format_RelatedApiConsumer Spartan_Format_RelatedApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IArticuloApiConsumer       = ArticuloApiConsumer;
     this._userCredential             = SessionHelper.UserCredential;
     this._tokenManager = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ISpartan_FormatApiConsumer                  = Spartan_FormatApiConsumer;
     this._ISpartan_Format_PermissionsApiConsumer      = Spartan_Format_PermissionsApiConsumer;
     this._IGeneratePDFApiConsumer           = GeneratePDFApiConsumer;
     this._ISpartan_FormatRelatedApiConsumer = Spartan_Format_RelatedApiConsumer;
 }
 public SecurityAdministrationController(ITokenManager tokenManager, ISpartan_User_RoleApiConsumer userRoleApiConsumer, ISpartan_User_Role_StatusApiConsumer userRoleStatusApiConsumer, ISpartanModuleApiConsumer spartanModuleApiConsumer, ISpartanUserRoleModuleApiConsumer SpartanUserRoleModuleApiConsumer, ISpartaneModuleObjectApiConsumer SpartaneModuleObjectApiConsumer, ISpartaneUserRoleModuleObjectApiConsumer SpartaneUserRoleModuleObjectApiConsumer, ISpartaneUserRoleObjectFunctionApiConsumer SpartaneUserRoleObjectFunctionApiConsumer, ISpartaneObjectApiConsumer SpartaneObjectApiConsumer, ISpartan_MetadataApiConsumer Spartan_MetadataApiConsumer, ISpartan_Traduction_DetailApiConsumer Spartan_Traduction_DetailApiConsumer, ISpartaneQueryApiConsumer SpartaneQueryApiConsumer)
 {
     this._IUserRoleApiConsumer                       = userRoleApiConsumer;
     this._IUserRoleStatusApiConsumer                 = userRoleStatusApiConsumer;
     this._ISpartanModuleApiConsumer                  = spartanModuleApiConsumer;
     this._ISpartanUserRoleModuleApiConsumer          = SpartanUserRoleModuleApiConsumer;
     this._ISpartaneModuleObjectApiConsumer           = SpartaneModuleObjectApiConsumer;
     this._ISpartaneUserRoleModuleObjectApiConsumer   = SpartaneUserRoleModuleObjectApiConsumer;
     this._ISpartaneUserRoleObjectFunctionApiConsumer = SpartaneUserRoleObjectFunctionApiConsumer;
     this._ISpartaneObjectApiConsumer                 = SpartaneObjectApiConsumer;
     this._tokenManager = tokenManager;
     this._ISpartan_MetadataApiConsumer          = Spartan_MetadataApiConsumer;
     this._ISpartan_Traduction_DetailApiConsumer = Spartan_Traduction_DetailApiConsumer;
     this._ISpartaneQueryApiConsumer             = SpartaneQueryApiConsumer;
 }
示例#36
0
 public Detalle_Consulta_Actividades_Registro_EventoController(IDetalle_Consulta_Actividades_Registro_EventoService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Consulta_Actividades_Registro_EventoApiConsumer Detalle_Consulta_Actividades_Registro_EventoApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IDetalle_Actividades_EventoApiConsumer Detalle_Actividades_EventoApiConsumer, ITipos_de_ActividadesApiConsumer Tipos_de_ActividadesApiConsumer, IEspecialidadesApiConsumer EspecialidadesApiConsumer, ISpartan_UserApiConsumer Spartan_UserApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_Consulta_Actividades_Registro_EventoApiConsumer = Detalle_Consulta_Actividades_Registro_EventoApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IDetalle_Actividades_EventoApiConsumer      = Detalle_Actividades_EventoApiConsumer;
     this._ITipos_de_ActividadesApiConsumer            = Tipos_de_ActividadesApiConsumer;
     this._IEspecialidadesApiConsumer                  = EspecialidadesApiConsumer;
     this._ISpartan_UserApiConsumer                    = Spartan_UserApiConsumer;
 }
 public AuthController([FromServices]
                       IUserService userService,
                       ITokenManager tokenManager,
                       IUserSessionService userSessionService,
                       IProblemService problemService,
                       IUserWalletService userWalletService,
                       ISpecialistService specialistService)
 {
     UserService        = userService;
     TokenManager       = tokenManager;
     UserSessionService = userSessionService;
     ProblemService     = problemService;
     UserWalletService  = userWalletService;
     SpecialistService  = specialistService;
 }
 public Spartan_WorkFlow_PhasesController(ISpartan_WorkFlow_PhasesService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, ISpartan_WorkFlow_PhasesApiConsumer Spartan_WorkFlow_PhasesApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ISpartan_WorkFlow_Phase_TypeApiConsumer Spartan_WorkFlow_Phase_TypeApiConsumer, ISpartan_WorkFlow_Type_Work_DistributionApiConsumer Spartan_WorkFlow_Type_Work_DistributionApiConsumer, ISpartan_WorkFlow_Type_Flow_ControlApiConsumer Spartan_WorkFlow_Type_Flow_ControlApiConsumer, ISpartan_WorkFlow_Phase_StatusApiConsumer Spartan_WorkFlow_Phase_StatusApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer          = authenticationApiConsumer;
     this._ISpartan_WorkFlow_PhasesApiConsumer = Spartan_WorkFlow_PhasesApiConsumer;
     this._userCredential                                      = SessionHelper.UserCredential;
     this._tokenManager                                        = tokenManager;
     this._ISpartane_FileApiConsumer                           = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer                   = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer         = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ISpartan_WorkFlow_Phase_TypeApiConsumer             = Spartan_WorkFlow_Phase_TypeApiConsumer;
     this._ISpartan_WorkFlow_Type_Work_DistributionApiConsumer = Spartan_WorkFlow_Type_Work_DistributionApiConsumer;
     this._ISpartan_WorkFlow_Type_Flow_ControlApiConsumer      = Spartan_WorkFlow_Type_Flow_ControlApiConsumer;
     this._ISpartan_WorkFlow_Phase_StatusApiConsumer           = Spartan_WorkFlow_Phase_StatusApiConsumer;
 }
示例#39
0
 public Detalle_Aseguramiento_de_Pistas_de_AterrizajeController(IDetalle_Aseguramiento_de_Pistas_de_AterrizajeService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Aseguramiento_de_Pistas_de_AterrizajeApiConsumer Detalle_Aseguramiento_de_Pistas_de_AterrizajeApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IMotivo_de_RegistroApiConsumer Motivo_de_RegistroApiConsumer, ITipo_de_Pista_de_AterrizajeApiConsumer Tipo_de_Pista_de_AterrizajeApiConsumer, ITipo_de_OrientacionApiConsumer Tipo_de_OrientacionApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_Aseguramiento_de_Pistas_de_AterrizajeApiConsumer = Detalle_Aseguramiento_de_Pistas_de_AterrizajeApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IMotivo_de_RegistroApiConsumer              = Motivo_de_RegistroApiConsumer;
     this._ITipo_de_Pista_de_AterrizajeApiConsumer     = Tipo_de_Pista_de_AterrizajeApiConsumer;
     this._ITipo_de_OrientacionApiConsumer             = Tipo_de_OrientacionApiConsumer;
     this._ITipo_de_OrientacionApiConsumer             = Tipo_de_OrientacionApiConsumer;
 }
示例#40
0
 public Detalle_Aseguramiento_de_Drogas_InvolucradasController(IDetalle_Aseguramiento_de_Drogas_InvolucradasService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_Aseguramiento_de_Drogas_InvolucradasApiConsumer Detalle_Aseguramiento_de_Drogas_InvolucradasApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IMotivo_de_RegistroApiConsumer Motivo_de_RegistroApiConsumer, ITipo_de_DrogaApiConsumer Tipo_de_DrogaApiConsumer, IModo_de_Asegurado_de_DrogasApiConsumer Modo_de_Asegurado_de_DrogasApiConsumer, IUnidad_de_medida_de_tipo_de_drogaApiConsumer Unidad_de_medida_de_tipo_de_drogaApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_Aseguramiento_de_Drogas_InvolucradasApiConsumer = Detalle_Aseguramiento_de_Drogas_InvolucradasApiConsumer;
     this._userCredential                                = SessionHelper.UserCredential;
     this._tokenManager                                  = tokenManager;
     this._ISpartane_FileApiConsumer                     = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer             = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer   = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IMotivo_de_RegistroApiConsumer                = Motivo_de_RegistroApiConsumer;
     this._ITipo_de_DrogaApiConsumer                     = Tipo_de_DrogaApiConsumer;
     this._IModo_de_Asegurado_de_DrogasApiConsumer       = Modo_de_Asegurado_de_DrogasApiConsumer;
     this._IUnidad_de_medida_de_tipo_de_drogaApiConsumer = Unidad_de_medida_de_tipo_de_drogaApiConsumer;
 }
 public Spartan_SettingsController(ISpartan_SettingsService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, ISpartan_SettingsApiConsumer Spartan_SettingsApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ISpartan_FormatApiConsumer Spartan_FormatApiConsumer, ISpartan_Format_PermissionsApiConsumer Spartan_Format_PermissionsApiConsumer, ISpartan_WorkFlow_PhasesApiConsumer ISpartan_WorkFlow_PhasesApiConsumer, IGeneratePDFApiConsumer GeneratePDFApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer   = authenticationApiConsumer;
     this._ISpartan_SettingsApiConsumer = Spartan_SettingsApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ISpartan_FormatApiConsumer                  = Spartan_FormatApiConsumer;
     this._ISpartan_Format_PermissionsApiConsumer      = Spartan_Format_PermissionsApiConsumer;
     this._IGeneratePDFApiConsumer                     = GeneratePDFApiConsumer;
     this._ISpartan_WorkFlow_PhasesApiConsumer         = ISpartan_WorkFlow_PhasesApiConsumer;
 }
 public Detalle_de_PadecimientosController(IDetalle_de_PadecimientosService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_de_PadecimientosApiConsumer Detalle_de_PadecimientosApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IPadecimientosApiConsumer PadecimientosApiConsumer, ITiempo_PadecimientoApiConsumer Tiempo_PadecimientoApiConsumer, IRespuesta_LogicaApiConsumer Respuesta_LogicaApiConsumer, IEstatus_PadecimientoApiConsumer Estatus_PadecimientoApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer           = authenticationApiConsumer;
     this._IDetalle_de_PadecimientosApiConsumer = Detalle_de_PadecimientosApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IPadecimientosApiConsumer                   = PadecimientosApiConsumer;
     this._ITiempo_PadecimientoApiConsumer             = Tiempo_PadecimientoApiConsumer;
     this._IRespuesta_LogicaApiConsumer                = Respuesta_LogicaApiConsumer;
     this._IEstatus_PadecimientoApiConsumer            = Estatus_PadecimientoApiConsumer;
 }
示例#43
0
 public Detalle_de_Persona_Moral_MPIController(IDetalle_de_Persona_Moral_MPIService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, IDetalle_de_Persona_Moral_MPIApiConsumer Detalle_de_Persona_Moral_MPIApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, IPaisApiConsumer PaisApiConsumer, IEstadoApiConsumer EstadoApiConsumer, IMunicipioApiConsumer MunicipioApiConsumer, ILocalidadApiConsumer LocalidadApiConsumer, IColoniaApiConsumer ColoniaApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._IDetalle_de_Persona_Moral_MPIApiConsumer = Detalle_de_Persona_Moral_MPIApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._IPaisApiConsumer                            = PaisApiConsumer;
     this._IEstadoApiConsumer                          = EstadoApiConsumer;
     this._IMunicipioApiConsumer                       = MunicipioApiConsumer;
     this._ILocalidadApiConsumer                       = LocalidadApiConsumer;
     this._IColoniaApiConsumer                         = ColoniaApiConsumer;
 }
 public Spartan_Report_Fields_DetailController(ISpartan_Report_Fields_DetailService service, ITokenManager tokenManager, IAuthenticationApiConsumer authenticationApiConsumer, ISpartan_Report_Fields_DetailApiConsumer Spartan_Report_Fields_DetailApiConsumer, ISpartane_FileApiConsumer Spartane_FileApiConsumer, ISpartan_Business_RuleApiConsumer Spartan_Business_RuleApiConsumer, ISpartan_BR_Process_Event_DetailApiConsumer Spartan_BR_Process_Event_DetailApiConsumer, ISpartan_Report_FunctionApiConsumer Spartan_Report_FunctionApiConsumer, ISpartan_Report_FormatApiConsumer Spartan_Report_FormatApiConsumer, ISpartan_Report_Order_TypeApiConsumer Spartan_Report_Order_TypeApiConsumer, ISpartan_Report_Field_TypeApiConsumer Spartan_Report_Field_TypeApiConsumer, ISpartan_MetadataApiConsumer Spartan_MetadataApiConsumer)
 {
     this.service = service;
     this._IAuthenticationApiConsumer = authenticationApiConsumer;
     this._ISpartan_Report_Fields_DetailApiConsumer = Spartan_Report_Fields_DetailApiConsumer;
     this._userCredential                              = SessionHelper.UserCredential;
     this._tokenManager                                = tokenManager;
     this._ISpartane_FileApiConsumer                   = Spartane_FileApiConsumer;
     this._ISpartan_Business_RuleApiConsumer           = Spartan_Business_RuleApiConsumer;
     this._ISpartan_BR_Process_Event_DetailApiConsumer = Spartan_BR_Process_Event_DetailApiConsumer;
     this._ISpartan_Report_FunctionApiConsumer         = Spartan_Report_FunctionApiConsumer;
     this._ISpartan_Report_FormatApiConsumer           = Spartan_Report_FormatApiConsumer;
     this._ISpartan_Report_Order_TypeApiConsumer       = Spartan_Report_Order_TypeApiConsumer;
     this._ISpartan_Report_Field_TypeApiConsumer       = Spartan_Report_Field_TypeApiConsumer;
     this._ISpartan_MetadataApiConsumer                = Spartan_MetadataApiConsumer;
 }
 public HospitalRegistrationsService(IEmptyPlaceStatisticRepository emptyPlaceStatisticRepository,
     IHospitalSectionProfileRepository hospitalSectionProfileRepository, ITokenManager tokenManager,
     IHospitalUserRepository hospitalUserRepository, IEmptyPlaceByTypeStatisticRepository emptyPlaceByTypeStatisticRepository, IReservationRepository reservationRepository, IUserRepository userRepository, IMessageRepository messageRepository, IPatientRepository patientRepository, IHospitalManager hospitalManager, IReservationFileRepository reservationFileRepository, IHospitalUserSectionAccessRepository hospitalUserSectionAccessRepository)
 {
     _emptyPlaceStatisticRepository = emptyPlaceStatisticRepository;
     _hospitalSectionProfileRepository = hospitalSectionProfileRepository;
     _tokenManager = tokenManager;
     _hospitalUserRepository = hospitalUserRepository;
     _emptyPlaceByTypeStatisticRepository = emptyPlaceByTypeStatisticRepository;
     _reservationRepository = reservationRepository;
     _userRepository = userRepository;
     _messageRepository = messageRepository;
     _patientRepository = patientRepository;
     this._hospitalManager = hospitalManager;
     _reservationFileRepository = reservationFileRepository;
     this._hospitalUserSectionAccessRepository = hospitalUserSectionAccessRepository;
 }
 public ClinicRegistrationsService(ISectionProfileRepository sectionProfileRepository, IClinicManager clinicManager, ITokenManager tokenManager, IEmptyPlaceByTypeStatisticRepository emptyPlaceByTypeStatisticRepository, IClinicUserHospitalSectionProfileAccessRepository clinicUserHospitalSectionProfileAccessRepository, IHospitalRepository hospitalRepository, IReservationRepository reservationRepository, IMessageRepository messageRepository, IUserRepository userRepository, IHospitalSectionProfileRepository hospitalSectionProfileRepository, IHospitalManager hospitalManager, IClinicRepository clinicRepository, IReservationFileRepository reservationFile, IEmptyPlaceStatisticRepository emptyPlaceStatisticRepository)
 {
     _sectionProfileRepository = sectionProfileRepository;
     this._clinicManager = clinicManager;
     _tokenManager = tokenManager;
     _emptyPlaceByTypeStatisticRepository = emptyPlaceByTypeStatisticRepository;
     _clinicUserHospitalSectionProfileAccessRepository = clinicUserHospitalSectionProfileAccessRepository;
     _hospitalRepository = hospitalRepository;
     _reservationRepository = reservationRepository;
     _messageRepository = messageRepository;
     _userRepository = userRepository;
     this._hospitalSectionProfileRepository = hospitalSectionProfileRepository;
     this._hospitalManager = hospitalManager;
     _clinicRepository = clinicRepository;
     _reservationFileRepository = reservationFile;
     _emptyPlaceStatisticRepository = emptyPlaceStatisticRepository;
 }
        public void SetUp()
        {
            var userManager = new Mock<IUserManager>();
            userManager.Setup(x => x.AuthenticateUserAsync(It.IsAny<string>()))
                .ReturnsAsync(new SentinelPrincipal(
                        new SentinelIdentity(
                            AuthenticationType.OAuth,
                            new SentinelClaim(ClaimTypes.Name, "azzlack"),
                            new SentinelClaim(ClaimType.Client, "NUnit"))));

            this.tokenManager = new TokenManager(
                LogManager.GetLogger(typeof(RedisTokenRepositoryTests)),
                userManager.Object,
                new PrincipalProvider(new PBKDF2CryptoProvider()),
                new PBKDF2CryptoProvider(),
                new RedisTokenFactory(),
                new RedisTokenRepository(new RedisTokenRepositoryConfiguration(ConfigurationManager.AppSettings["RedisHost"], 4, "sentinel.oauth", LogManager.GetLogger(typeof(RedisTokenRepositoryTests)))));
        }
示例#48
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
        /// </summary>
        /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
        /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
        /// <param name="messageTypeProvider">An object that can figure out what type of message is being received for deserialization.</param>
        public ServiceProvider(ServiceProviderDescription serviceDescription, ITokenManager tokenManager, OAuthServiceProviderMessageFactory messageTypeProvider)
        {
            if (serviceDescription == null) {
                throw new ArgumentNullException("serviceDescription");
            }
            if (tokenManager == null) {
                throw new ArgumentNullException("tokenManager");
            }
            if (messageTypeProvider == null) {
                throw new ArgumentNullException("messageTypeProvider");
            }

            var signingElement = serviceDescription.CreateTamperProtectionElement();
            INonceStore store = new NonceMemoryStore(StandardExpirationBindingElement.DefaultMaximumMessageAge);
            this.ServiceDescription = serviceDescription;
            this.OAuthChannel = new OAuthChannel(signingElement, store, tokenManager, messageTypeProvider);
            this.TokenGenerator = new StandardTokenGenerator();
        }
        public void SetUp()
        {
            var userManager = new Mock<IUserManager>();
            userManager.Setup(x => x.AuthenticateUserAsync(It.IsAny<string>()))
                .ReturnsAsync(new SentinelPrincipal(
                        new SentinelIdentity(
                            AuthenticationType.OAuth,
                            new SentinelClaim(ClaimTypes.Name, "azzlack"),
                            new SentinelClaim(ClaimType.Client, "NUnit"))));

            this.tokenManager = new TokenManager(
                LogManager.GetLogger(typeof(RavenDbTokenRepositoryTests)),
                userManager.Object,
                new PrincipalProvider(new PBKDF2CryptoProvider()),
                new PBKDF2CryptoProvider(),
                new RavenTokenFactory(),
                new RavenDbTokenRepository(
                    new RavenDbTokenRepositoryConfiguration(new EmbeddableDocumentStore() { RunInMemory = true })));
        }
		public LoginPageViewModel(ITokenManager tokenManager)
		{
			_tokenManager = tokenManager;

			LogInCommand = new Command(async() => await LogIn());
		}
示例#51
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestPostNavigateHook"/> class.
 /// </summary>
 /// <param name="tokenManager">The token manager.</param>
 public TestPostNavigateHook(ITokenManager tokenManager)
 {
     this.tokenManager = tokenManager;
 }
		public ArticlesServiceClient(ITokenManager tokenManager) 
			: base(tokenManager) {}
示例#53
0
 public AdminController(ITokenManager tokenManager) {
     _tokenManager = tokenManager;
 }
示例#54
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DesktopConsumer"/> class.
 /// </summary>
 /// <param name="serviceDescription">The endpoints and behavior of the Service Provider.</param>
 /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
 public DesktopConsumer(ServiceProviderDescription serviceDescription, ITokenManager tokenManager)
     : base(serviceDescription, tokenManager)
 {
 }
示例#55
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceProvider"/> class.
 /// </summary>
 /// <param name="serviceDescription">The endpoints and behavior on the Service Provider.</param>
 /// <param name="tokenManager">The host's method of storing and recalling tokens and secrets.</param>
 public ServiceProvider(ServiceProviderDescription serviceDescription, ITokenManager tokenManager)
     : this(serviceDescription, tokenManager, new OAuthServiceProviderMessageFactory(tokenManager))
 {
 }
		public GalleryServiceClient(ITokenManager tokenManager) : base(tokenManager) {}
示例#57
0
	    /// <summary>
	    /// Initializes a new instance of the <see cref="PageNavigationSteps" /> class.
	    /// </summary>
	    /// <param name="scenarioContext">The scenario context.</param>
	    /// <param name="actionPipelineService">The action pipeline service.</param>
        /// <param name="tokenManager">The token manager.</param>
	    public PageNavigationSteps(IScenarioContextHelper scenarioContext, IActionPipelineService actionPipelineService, ITokenManager tokenManager)
            : base(scenarioContext)
	    {
	        this.actionPipelineService = actionPipelineService;
	        this.tokenManager = tokenManager;
	    }
示例#58
0
		/// <summary>
		/// Initializes the binding elements for the OAuth channel.
		/// </summary>
		/// <param name="signingBindingElement">The signing binding element.</param>
		/// <param name="store">The nonce store.</param>
		/// <param name="tokenManager">The token manager.</param>
		/// <returns>An array of binding elements used to initialize the channel.</returns>
		private static IChannelBindingElement[] InitializeBindingElements(ITamperProtectionChannelBindingElement signingBindingElement, INonceStore store, ITokenManager tokenManager) {
			var bindingElements = new List<IChannelBindingElement> {
				new OAuthHttpMethodBindingElement(),
				signingBindingElement,
				new StandardExpirationBindingElement(),
				new StandardReplayProtectionBindingElement(store),
			};

			var spTokenManager = tokenManager as IServiceProviderTokenManager;
			if (spTokenManager != null) {
				bindingElements.Insert(0, new TokenHandlingBindingElement(spTokenManager));
			}

			return bindingElements.ToArray();
		}
 public ReceptionMarkingService(IReservationRepository reservationRepository, ITokenManager tokenManager, IHospitalManager hospitalManager)
 {
     this.reservationRepository = reservationRepository;
     this.tokenManager = tokenManager;
     this.hospitalManager = hospitalManager;
 }
示例#60
0
 public AvailabilityService(IHttpCommunicator httpCommunicator, ITokenManager tokenManager)
 {
     _httpCommunicator = httpCommunicator;
     _tokenManager = tokenManager;
 }