本文整理汇总了C#中IAuthenticationProvider类的典型用法代码示例。如果您正苦于以下问题:C# IAuthenticationProvider类的具体用法?C# IAuthenticationProvider怎么用?C# IAuthenticationProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IAuthenticationProvider类属于命名空间,在下文中一共展示了IAuthenticationProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
}
}
示例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)))));
}
示例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)
{
}
示例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;
}
示例5: VartotojaiController
public VartotojaiController(IAuthenticationProvider authenticationProvider, ISessionFactory sessionFactory, [LoggedIn] UserInformation loggedInUser, HashAlgorithm hashAlgorithm)
{
_authenticationProvider = authenticationProvider;
_sessionFactory = sessionFactory;
_loggedInUser = loggedInUser;
_hashAlgorithm = hashAlgorithm;
}
示例6: SettingsController
public SettingsController(IUserReaderService userReaderService, IUserWriterService userWriterService, IAuthenticationProvider authenticationProvider, ILoggerFactory loggerFactory)
{
_userReaderService = userReaderService;
_userWriterService = userWriterService;
_authenticationProvider = authenticationProvider;
_logger = loggerFactory.GetLogger("Settings");
}
示例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);
}
示例9: AccountController
public AccountController(IOpenIdMembershipService openIdMembershipService, IAuthenticationProvider authenticationProvider, IUserService userService, IUserProvider userProvider)
{
this.openIdMembershipService = openIdMembershipService;
this.authenticationProvider = authenticationProvider;
this.userService = userService;
this.userProvider = userProvider;
}
示例10: ServiceUrlBuilder
public ServiceUrlBuilder(ServiceType serviceType, IAuthenticationProvider authenticationProvider, string region, bool useInternalUrl)
{
_serviceType = serviceType;
_authenticationProvider = authenticationProvider;
_region = region;
_useInternalUrl = useInternalUrl;
}
示例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);
}
示例12: EstablishContext
protected override void EstablishContext()
{
wimpProvider = mocks.StrictMock<IWimpProvider>();
staffInformationProvider = mocks.Stub<IStaffInformationProvider>();
authenticationProvider = mocks.Stub<IAuthenticationProvider>();
userClaimsProvider = mocks.Stub<IUserClaimsProvider>();
}
示例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;
}
示例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;
}
示例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;
}