• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IAuthenticationProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IAuthenticationProvider的典型用法代码示例。如果您正苦于以下问题:C# IAuthenticationProvider类的具体用法?C# IAuthenticationProvider怎么用?C# IAuthenticationProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IAuthenticationProvider类属于命名空间,在下文中一共展示了IAuthenticationProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddGuidColumn

        public AddGuidColumn(BonoboGitServerContext context)
        {
            AuthProvider = DependencyResolver.Current.GetService<IAuthenticationProvider>();

            _db = context.Database;

            if (UpgradeHasAlreadyBeenRun())
            {
                return;
            }

            using (var trans = context.Database.BeginTransaction())
            {
                try
                {
                    RenameTables();
                    CreateTables();
                    CopyData();
                    AddRelations();
                    DropRenamedTables();
                    trans.Commit();
                }
                catch (Exception)
                {
                    trans.Rollback();
                    throw;
                }
            }
        }
开发者ID:smartcaveman,项目名称:Bonobo-Git-Server,代码行数:29,代码来源:AddGuidColumn.cs


示例2: EventStoreEmbeddedNodeConnection

        public EventStoreEmbeddedNodeConnection(ConnectionSettings settings, string connectionName, IPublisher publisher, ISubscriber bus, IAuthenticationProvider authenticationProvider)
        {
            Ensure.NotNull(publisher, "publisher");
            Ensure.NotNull(settings, "settings");

            Guid connectionId = Guid.NewGuid();

            _settings = settings;
            _connectionName = connectionName;
            _publisher = publisher;
            _authenticationProvider = authenticationProvider;
            _subscriptionBus = new InMemoryBus("Embedded Client Subscriptions");
            _subscriptions = new EmbeddedSubscriber(_subscriptionBus, _authenticationProvider, _settings.Log, connectionId);
            
            _subscriptionBus.Subscribe<ClientMessage.SubscriptionConfirmation>(_subscriptions);
            _subscriptionBus.Subscribe<ClientMessage.SubscriptionDropped>(_subscriptions);
            _subscriptionBus.Subscribe<ClientMessage.StreamEventAppeared>(_subscriptions);
            _subscriptionBus.Subscribe<ClientMessage.PersistentSubscriptionConfirmation>(_subscriptions);
            _subscriptionBus.Subscribe<ClientMessage.PersistentSubscriptionStreamEventAppeared>(_subscriptions);
            _subscriptionBus.Subscribe(new AdHocHandler<ClientMessage.SubscribeToStream>(_publisher.Publish));
            _subscriptionBus.Subscribe(new AdHocHandler<ClientMessage.UnsubscribeFromStream>(_publisher.Publish));
            _subscriptionBus.Subscribe(new AdHocHandler<ClientMessage.ConnectToPersistentSubscription>(_publisher.Publish));

            bus.Subscribe(new AdHocHandler<SystemMessage.BecomeShutdown>(_ => Disconnected(this, new ClientConnectionEventArgs(this, new IPEndPoint(IPAddress.None, 0)))));
        }
开发者ID:danieldeb,项目名称:EventStore,代码行数:25,代码来源:EventStoreEmbeddedNodeConnection.cs


示例3: OneDriveClient

 /// <summary>
 /// Instantiates a new OneDriveClient.
 /// </summary>
 /// <param name="baseUrl">The base service URL. For example, "https://api.onedrive.com/v1.0."</param>
 /// <param name="authenticationProvider">The <see cref="IAuthenticationProvider"/> for authenticating request messages.</param>
 /// <param name="httpProvider">The <see cref="IHttpProvider"/> for sending requests.</param>
 public OneDriveClient(
     string baseUrl,
     IAuthenticationProvider authenticationProvider,
     IHttpProvider httpProvider = null)
     : base(baseUrl, authenticationProvider, httpProvider)
 {
 }
开发者ID:OneDrive,项目名称:onedrive-sdk-csharp,代码行数:13,代码来源:OneDriveClient.cs


示例4: TcpCustomServerProtocolSetup

 /// <summary>
 /// Erstellt eine neue Instanz von TcpCustomServerProtocolSetup.
 /// </summary>
 /// <param name="tcpPort">TCP-Anschlußnummer</param>
 /// <param name="authProvider">Authentifizierungsanbieter</param>
 public TcpCustomServerProtocolSetup(int tcpPort,IAuthenticationProvider authProvider)
     : this()
 {
     // Werte übernehmen
     TcpPort = tcpPort;
     AuthenticationProvider=authProvider;
 }
开发者ID:yallie,项目名称:zyan,代码行数:12,代码来源:TcpCustomServerProtocolSetup.cs


示例5: VartotojaiController

 public VartotojaiController(IAuthenticationProvider authenticationProvider, ISessionFactory sessionFactory, [LoggedIn] UserInformation loggedInUser, HashAlgorithm hashAlgorithm)
 {
     _authenticationProvider = authenticationProvider;
     _sessionFactory = sessionFactory;
     _loggedInUser = loggedInUser;
     _hashAlgorithm = hashAlgorithm;
 }
开发者ID:zaLTys,项目名称:osfi,代码行数:7,代码来源:VartotojaiController.cs


示例6: SettingsController

 public SettingsController(IUserReaderService userReaderService, IUserWriterService userWriterService, IAuthenticationProvider authenticationProvider, ILoggerFactory loggerFactory)
 {
     _userReaderService = userReaderService;
     _userWriterService = userWriterService;
     _authenticationProvider = authenticationProvider;
     _logger = loggerFactory.GetLogger("Settings");
 }
开发者ID:medvekoma,项目名称:portfotolio,代码行数:7,代码来源:SettingsController.cs


示例7: AuthenticationRegistry

        public AuthenticationRegistry(IAuthenticationProvider facebookProvider,
                                      IAuthenticationProvider googleProvider,
                                      IAuthenticationProvider twitterProvider)
        {
            var authenticationService = new AuthenticationService();

            if (facebookProvider != null)
            {
                authenticationService.AddProvider(facebookProvider);
            }

            if (googleProvider != null)
            {
                authenticationService.AddProvider(googleProvider);
            }

            if (twitterProvider != null)
            {
                authenticationService.AddProvider(twitterProvider);
            }

            For<IAuthenticationService>()
                .Use(authenticationService)
                .Named("Authentication Service.");
        }
开发者ID:codeprogression,项目名称:WorldDomination.Web.Authentication,代码行数:25,代码来源:AuthenticationRegistry.cs


示例8: MqttIotHubAdapter

        public MqttIotHubAdapter(Settings settings, DeviceClientFactoryFunc deviceClientFactory, ISessionStatePersistenceProvider sessionStateManager, IAuthenticationProvider authProvider,
            ITopicNameRouter topicNameRouter, IQos2StatePersistenceProvider qos2StateProvider)
        {
            Contract.Requires(settings != null);
            Contract.Requires(sessionStateManager != null);
            Contract.Requires(authProvider != null);
            Contract.Requires(topicNameRouter != null);

            if (qos2StateProvider != null)
            {
                this.maxSupportedQosToClient = QualityOfService.ExactlyOnce;
                this.qos2StateProvider = qos2StateProvider;
            }
            else
            {
                this.maxSupportedQosToClient = QualityOfService.AtLeastOnce;
            }

            this.settings = settings;
            this.deviceClientFactory = deviceClientFactory;
            this.sessionStateManager = sessionStateManager;
            this.authProvider = authProvider;
            this.topicNameRouter = topicNameRouter;

            this.publishProcessor = new PacketAsyncProcessor<PublishPacket>(this.PublishToServerAsync);
            this.publishProcessor.Completion.OnFault(ShutdownOnPublishToServerFaultAction);

            TimeSpan? ackTimeout = this.settings.DeviceReceiveAckCanTimeout ? this.settings.DeviceReceiveAckTimeout : (TimeSpan?)null;
            this.publishPubAckProcessor = new RequestAckPairProcessor<AckPendingMessageState, PublishPacket>(this.AcknowledgePublishAsync, this.RetransmitNextPublish, ackTimeout);
            this.publishPubAckProcessor.Completion.OnFault(ShutdownOnPubAckFaultAction);
            this.publishPubRecProcessor = new RequestAckPairProcessor<AckPendingMessageState, PublishPacket>(this.AcknowledgePublishReceiveAsync, this.RetransmitNextPublish, ackTimeout);
            this.publishPubRecProcessor.Completion.OnFault(ShutdownOnPubRecFaultAction);
            this.pubRelPubCompProcessor = new RequestAckPairProcessor<CompletionPendingMessageState, PubRelPacket>(this.AcknowledgePublishCompleteAsync, this.RetransmitNextPublishRelease, ackTimeout);
            this.pubRelPubCompProcessor.Completion.OnFault(ShutdownOnPubCompFaultAction);
        }
开发者ID:nberdy,项目名称:azure-iot-protocol-gateway,代码行数:35,代码来源:MqttIotHubAdapter.cs


示例9: AccountController

 public AccountController(IOpenIdMembershipService openIdMembershipService, IAuthenticationProvider authenticationProvider, IUserService userService, IUserProvider userProvider)
 {
     this.openIdMembershipService = openIdMembershipService;
     this.authenticationProvider = authenticationProvider;
     this.userService = userService;
     this.userProvider = userProvider;
 }
开发者ID:adamlepkowski,项目名称:nQA,代码行数:7,代码来源:AccountController.cs


示例10: ServiceUrlBuilder

 public ServiceUrlBuilder(ServiceType serviceType, IAuthenticationProvider authenticationProvider, string region, bool useInternalUrl)
 {
     _serviceType = serviceType;
     _authenticationProvider = authenticationProvider;
     _region = region;
     _useInternalUrl = useInternalUrl;
 }
开发者ID:jmcupidon,项目名称:openstack.net,代码行数:7,代码来源:ServiceUrlBuilder.cs


示例11: LifeCycleManager

        public LifeCycleManager(IAuthenticationProvider authenticationProvider, String entityType)
        {
            Debug.WriteLine("Create new instance of LifeCycleManager for entityType '{0}'", entityType);
            _entityType = entityType;

            lock (_lock)
            {
                if (null == _staticStateMachineConfigLoader)
                {
                    LoadAndComposeParts();
                    _staticStateMachineConfigLoader = _stateMachineConfigLoader;
                    _staticCalloutExecutor = _calloutExecutor;
                }
                else
                {
                    _stateMachineConfigLoader = _staticStateMachineConfigLoader;
                    _calloutExecutor = _staticCalloutExecutor;
                }
            }
            _coreService = new CumulusCoreService.Core(new Uri(ConfigurationManager.AppSettings[CORE_ENDPOINT_URL_KEY]));
            _coreService.BuildingRequest += CoreServiceOnBuildingRequest;

            _entityController = new EntityController(authenticationProvider);
            _stateMachine = new StateMachine.StateMachine();
            ConfigureStateMachine(entityType);
        }
开发者ID:dfensgmbh,项目名称:biz.dfch.CS.Entity.LifeCycleManager,代码行数:26,代码来源:LifeCycleManager.cs


示例12: EstablishContext

 protected override void EstablishContext()
 {
     wimpProvider = mocks.StrictMock<IWimpProvider>();
     staffInformationProvider = mocks.Stub<IStaffInformationProvider>();
     authenticationProvider = mocks.Stub<IAuthenticationProvider>();
     userClaimsProvider = mocks.Stub<IUserClaimsProvider>();
 }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:7,代码来源:GetImpersonatedClaimsDataProviderFixture.cs


示例13: ConnectionScheduler

        /// <summary>
        /// Initializes a new instance of the <see cref="CmisSync.Lib.Queueing.ConnectionScheduler"/> class.
        /// </summary>
        /// <param name="repoInfo">Repo info.</param>
        /// <param name="queue">Event queue.</param>
        /// <param name="sessionFactory">Session factory.</param>
        /// <param name="authProvider">Auth provider.</param>
        /// <param name="interval">Retry interval in msec.</param>
        public ConnectionScheduler(
            RepoInfo repoInfo,
            ISyncEventQueue queue,
            ISessionFactory sessionFactory,
            IAuthenticationProvider authProvider,
            int interval = 5000)
        {
            if (interval <= 0) {
                throw new ArgumentException(string.Format("Given Interval \"{0}\" is smaller or equal to null", interval));
            }

            if (repoInfo == null) {
                throw new ArgumentNullException("repoInfo");
            }

            if (queue == null) {
                throw new ArgumentNullException("queue");
            }

            if (sessionFactory == null) {
                throw new ArgumentNullException("sessionFactory");
            }

            if (authProvider == null) {
                throw new ArgumentNullException("authProvider");
            }

            this.Queue = queue;
            this.SessionFactory = sessionFactory;
            this.RepoInfo = repoInfo;
            this.AuthProvider = authProvider;
            this.Interval = interval;
        }
开发者ID:OpenDataSpace,项目名称:CmisSync,代码行数:41,代码来源:ConnectionScheduler.cs


示例14: HttpCustomServerProtocolSetup

 /// <summary>
 /// Erstellt eine neue Instanz von HttpCustomServerProtocolSetup.
 /// </summary>
 /// <param name="httpPort">HTTP-Anschlußnummer</param>
 /// <param name="authProvider">Authentifizierungsanbieter</param>
 public HttpCustomServerProtocolSetup(int httpPort, IAuthenticationProvider authProvider)
     : this()
 {
     // Werte übernehmen
     HttpPort = httpPort;
     AuthenticationProvider = authProvider;
 }
开发者ID:yallie,项目名称:zyan,代码行数:12,代码来源:HttpCustomServerProtocolSetup.cs


示例15: IdentityClaimsGetOutputClaimsIdentityProvider

 public IdentityClaimsGetOutputClaimsIdentityProvider(IStaffInformationProvider staffInformationProvider, IAuthenticationProvider authenticationProvider,
     IDashboardUserClaimsInformationProvider<EdFiUserSecurityDetails> dashboardUserClaimsInformationProvider, IHttpRequestProvider httpRequestProvider)
 {
     this.staffInformationProvider = staffInformationProvider;
     this.authenticationProvider = authenticationProvider;
     this.dashboardUserClaimsInformationProvider = dashboardUserClaimsInformationProvider;
     this.httpRequestProvider = httpRequestProvider;
 }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:8,代码来源:IdentityClaimsGetOutputClaimsIdentityProvider.cs


示例16: GetImpersonatedClaimsDataProvider

 public GetImpersonatedClaimsDataProvider(IWimpProvider wimpProvider, IStaffInformationProvider staffInformationProvider,
     IAuthenticationProvider authenticationProvider, IUserClaimsProvider userClaimsProvider)
 {
     this.wimpProvider = wimpProvider;
     this.staffInformationProvider = staffInformationProvider;
     this.authenticationProvider = authenticationProvider;
     this.userClaimsProvider = userClaimsProvider;
 }
开发者ID:sybrix,项目名称:EdFi-App,代码行数:8,代码来源:GetImpersonatedClaimsDataProvider.cs


示例17: AccountProvider

 public AccountProvider(IAuthenticationProvider authenticationProvider, ICaptchaProvider captchaProvider,
                        IEmailProvider emailProvider, IMobileProvider mobileProvider)
 {
     _authenticationProvider = authenticationProvider;
     _captchaProvider = captchaProvider;
     _emailProvider = emailProvider;
     _mobileProvider = mobileProvider;
 }
开发者ID:varunupcurve,项目名称:myrepo,代码行数:8,代码来源:AccountProvider.cs


示例18: Initialize

 public void Initialize(IPipeline pipelineRunner)
 {
     _authentication = _resolver.Resolve<IAuthenticationProvider>();
     pipelineRunner.Notify(ReadCredentials)
         .After<KnownStages.IBegin>()
         .And
         .Before<KnownStages.IHandlerSelection>();
 }
开发者ID:dhootha,项目名称:openrasta-core,代码行数:8,代码来源:BasicAuthorizerContributor.cs


示例19: Authenticate

 public static FlurlClient Authenticate(this FlurlClient client, IAuthenticationProvider authenticationProvider)
 {
     var authenticatedMessageHandler = client.HttpMessageHandler as AuthenticatedMessageHandler;
     if (authenticatedMessageHandler != null)
     {
         authenticatedMessageHandler.AuthenticationProvider = authenticationProvider;
     }
     return client;
 }
开发者ID:jmcupidon,项目名称:openstack.net,代码行数:9,代码来源:FlurlExtensions.cs


示例20: SetUp

        public void SetUp()
        {
            ServiceLocatorInitializer.Init();
            controller = new MembershipController();

            mockedMembershipProvider = MockRepository.GenerateMock<IMembershipProvider>();
            mockedAuthenticationProvider = MockRepository.GenerateMock<IAuthenticationProvider>();
            mockedAuthorizationProvider = MockRepository.GenerateMock<IAuthorizationProvider>();
        }
开发者ID:zachariahyoung,项目名称:virtualaltnet,代码行数:9,代码来源:MembershipControllerTests.cs



注:本文中的IAuthenticationProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IAuthenticationRequest类代码示例发布时间:2022-05-24
下一篇:
C# IAuthenticationManager类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap