当前位置: 首页>>代码示例>>C#>>正文


C# IAuthProvider类代码示例

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


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

示例1: SetUp

 public void SetUp()
 {
   AppraiserSignUpService = Substitute.For<IAppraiserSignUpService>();
   AuthProvider = Substitute.For<IAuthProvider>();
   Target = new AppraiserSignUpController(AppraiserSignUpService, AuthProvider);
   Target.CommitProviderInstance = Substitute.For<ICommitProvider>();
 }
开发者ID:evkap,项目名称:DVS,代码行数:7,代码来源:AppraiserSignUpControllerTest.cs

示例2: VerifyUserAccountController

 public VerifyUserAccountController(IUserRepo urep, IAuthProvider auth, IAccountRepo account, ICCFolderRepo folderRep)
 {
     userRepository = urep;
     authProvider = auth;
     accRepository = account;
     CCFolderRepository = folderRep;
 }
开发者ID:sam1169,项目名称:xobnu-web-interface,代码行数:7,代码来源:VerifyUserAccountController.cs

示例3: Configuration

 /// <summary>
 /// Creates a new instance. This class is also used to shareable a context across all instance that are created below one Cluster instance.
 /// One configuration instance per Cluster instance.
 /// </summary>
 internal Configuration(Policies policies,
     ProtocolOptions protocolOptions,
     PoolingOptions poolingOptions,
     SocketOptions socketOptions,
     ClientOptions clientOptions,
     IAuthProvider authProvider,
     IAuthInfoProvider authInfoProvider,
     QueryOptions queryOptions,
     IAddressTranslator addressTranslator)
 {
     if (addressTranslator == null)
     {
         throw new ArgumentNullException("addressTranslator");
     }
     if (queryOptions == null)
     {
         throw new ArgumentNullException("queryOptions");
     }
     _policies = policies;
     _protocolOptions = protocolOptions;
     _poolingOptions = poolingOptions;
     _socketOptions = socketOptions;
     _clientOptions = clientOptions;
     _authProvider = authProvider;
     _authInfoProvider = authInfoProvider;
     _queryOptions = queryOptions;
     _addressTranslator = addressTranslator;
 }
开发者ID:yar1k0v,项目名称:csharp-driver,代码行数:32,代码来源:Configuration.cs

示例4: ControlConnection

        internal ControlConnection(Cluster cluster,
                                   IEnumerable<IPAddress> clusterEndpoints,
                                   Policies policies,
                                   ProtocolOptions protocolOptions,
                                   PoolingOptions poolingOptions,
                                   SocketOptions socketOptions,
                                   ClientOptions clientOptions,
                                   IAuthProvider authProvider,
                                   IAuthInfoProvider authInfoProvider)
        {
            _cluster = cluster;
            _reconnectionSchedule = _reconnectionPolicy.NewSchedule();
            _reconnectionTimer = new Timer(ReconnectionClb, null, Timeout.Infinite, Timeout.Infinite);

            var config = new Configuration
            (
                policies,
                protocolOptions,
                poolingOptions,
                socketOptions,
                clientOptions,
                authProvider,
                authInfoProvider,
                new QueryOptions()
            );

            _session = new Session(cluster, config, "", ControlConnectionProtocolVersion);
        }
开发者ID:rasmus-s,项目名称:csharp-driver,代码行数:28,代码来源:ControlConnection.cs

示例5: StartupParams

 public StartupParams(IAuthProvider provider, IPathManager pathManager,
     ICustomNodeManager customNodeManager)
 {
     this.authProvider = provider;
     this.pathManager = pathManager;
     this.customNodeManager = customNodeManager;
 }
开发者ID:RevitLution,项目名称:Dynamo,代码行数:7,代码来源:StartupParams.cs

示例6: AuthFeature

        public AuthFeature(Func<IAuthSession> sessionFactory, IAuthProvider[] authProviders, string htmlRedirect = null)
        {
            this.sessionFactory = sessionFactory;
            this.authProviders = authProviders;

            Func<string,string> localize = HostContext.ResolveLocalizedString;

            ServiceRoutes = new Dictionary<Type, string[]> {
                { typeof(AuthenticateService), new[]
                    {
                        "/" + localize(LocalizedStrings.Auth), 
                        "/" + localize(LocalizedStrings.Auth) + "/{provider}", 
                        "/" + localize(LocalizedStrings.Authenticate), 
                        "/" + localize(LocalizedStrings.Authenticate) + "/{provider}",
                    } },
                { typeof(AssignRolesService), new[]{ "/" + localize(LocalizedStrings.AssignRoles) } },
                { typeof(UnAssignRolesService), new[]{ "/" + localize(LocalizedStrings.UnassignRoles) } },
            };

            RegisterPlugins = new List<IPlugin> {
                new SessionFeature()                          
            };

            this.HtmlRedirect = htmlRedirect ?? "~/" + localize(LocalizedStrings.Login);
        }
开发者ID:0815sugo,项目名称:ServiceStack,代码行数:25,代码来源:AuthFeature.cs

示例7: AuthFeature

        public AuthFeature(Func<IAuthSession> sessionFactory, IAuthProvider[] authProviders, string htmlRedirect = null)
        {
            this.sessionFactory = sessionFactory;
            this.authProviders = authProviders;

            Func<string,string> localize = s => HostContext.AppHost.ResolveLocalizedString(s, null);

            ServiceRoutes = new Dictionary<Type, string[]> {
                { typeof(AuthenticateService), new[]
                    {
                        "/" + localize(LocalizedStrings.Auth), 
                        "/" + localize(LocalizedStrings.Auth) + "/{provider}", 
                        "/" + localize(LocalizedStrings.Authenticate), 
                        "/" + localize(LocalizedStrings.Authenticate) + "/{provider}",
                    } },
                { typeof(AssignRolesService), new[]{ "/" + localize(LocalizedStrings.AssignRoles) } },
                { typeof(UnAssignRolesService), new[]{ "/" + localize(LocalizedStrings.UnassignRoles) } },
            };

            RegisterPlugins = new List<IPlugin> {
                new SessionFeature()        
            };

            AuthEvents = new List<IAuthEvents>();

            this.HtmlRedirect = htmlRedirect ?? "~/" + localize(LocalizedStrings.Login);
            this.IncludeAuthMetadataProvider = true;
            this.ValidateUniqueEmails = true;
            this.DeleteSessionCookiesOnLogout = true;
        }
开发者ID:dittodhole,项目名称:dotnet-ServiceStack,代码行数:30,代码来源:AuthFeature.cs

示例8: UserController

 public UserController(IAuthProvider authProvider)
 {
     _postService = new PostServiceClient();
     _friendService = new FriendServiceClient();
     _userService = new UserServiceClient();
     _authProvider = authProvider;
     _commentService = new CommentServiceClient();
 }
开发者ID:GerasimIG,项目名称:SimpleSocialNetwork,代码行数:8,代码来源:UserController.cs

示例9: Gist

 public Gist(
     ILogProvider logProvider,
     ICacheProvider cacheProvider,
     IAuthProvider authProvider)
     : base(
         logProvider,
         cacheProvider,
         authProvider) { }
开发者ID:KonstantinDavidov,项目名称:GithubSharp,代码行数:8,代码来源:Gist.cs

示例10: SettingsController

 public SettingsController(IUserService userService, IAuthProvider authProvider, 
     ILocationService locationService, IHash hash)
 {
     _userService = new UserServiceClient();
     _authProvider = authProvider;
     _locationService = new LocationServiceClient();
     _hash = hash;
 }
开发者ID:GerasimIG,项目名称:SimpleSocialNetwork,代码行数:8,代码来源:SettingsController.cs

示例11: SetUp

    public void SetUp()
    {
      _authProvider = MockRepository.GenerateMock<IAuthProvider>();
      _adminController = new AdminController(_authProvider);

      var httpContextMock = MockRepository.GenerateMock<HttpContextBase>();
      _adminController.Url = new UrlHelper(new RequestContext(httpContextMock, new RouteData()));
    }
开发者ID:ando-amws,项目名称:JustBlog,代码行数:8,代码来源:AdminControllerTests.cs

示例12: Configure

 public override void Configure(Container container)
 {
     var authProviders = new IAuthProvider[] { new AadAuthProvider(AppSettings) };
     Plugins.Add(new AuthFeature(
         () => new AuthUserSession(), 
         authProviders,
         htmlRedirect: "/auth/aad"));
 }
开发者ID:jfoshee,项目名称:ServiceStack.Authentication.Aad,代码行数:8,代码来源:AppHost.cs

示例13: AbstractMasterDetailPage

		protected AbstractMasterDetailPage (IAuthProvider ap) : base()
		{
			Icon = GetIcon();

			this.ap = ap;
			ShowPersonalPages (ap.AuthState.IsAuthorised);
			ap.AuthState.OnAuthChange += OnAuthChange;
		}
开发者ID:instantiator,项目名称:BAASBox.CRUD.UI,代码行数:8,代码来源:AbstractMasterDetailPage.cs

示例14: HomeController

		public HomeController(IUsersManagement userManagement,
			IAuthProvider authenticationProvider, IUserAccessHelper userAccessHelper, IAppraiserManagement appraiserManagement, ITaskManager taskManager)
		{
			_userManagement = userManagement;
			_authenticationProvider = authenticationProvider;
			_userAccessHelper = userAccessHelper;
			_appraiserManagement = appraiserManagement;
			_taskManager = taskManager;
		}
开发者ID:evkap,项目名称:DVS,代码行数:9,代码来源:HomeController.cs

示例15: InstallNew

 private async Task InstallNew(GroupContent mod, IAuthProvider provider, Action<SyncOptions> config,
     IAbsoluteDirectoryPath folder) {
     SetupHosts(mod, provider);
     var opts = new SyncOptions();
     config(opts);
     await
         Repository.Factory.Clone(opts.Hosts, folder.ToString(), config)
             .ConfigureAwait(false);
 }
开发者ID:SIXNetworks,项目名称:withSIX.Desktop,代码行数:9,代码来源:Group.cs


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