本文整理汇总了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>();
}
示例2: VerifyUserAccountController
public VerifyUserAccountController(IUserRepo urep, IAuthProvider auth, IAccountRepo account, ICCFolderRepo folderRep)
{
userRepository = urep;
authProvider = auth;
accRepository = account;
CCFolderRepository = folderRep;
}
示例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;
}
示例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);
}
示例5: StartupParams
public StartupParams(IAuthProvider provider, IPathManager pathManager,
ICustomNodeManager customNodeManager)
{
this.authProvider = provider;
this.pathManager = pathManager;
this.customNodeManager = customNodeManager;
}
示例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);
}
示例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;
}
示例8: UserController
public UserController(IAuthProvider authProvider)
{
_postService = new PostServiceClient();
_friendService = new FriendServiceClient();
_userService = new UserServiceClient();
_authProvider = authProvider;
_commentService = new CommentServiceClient();
}
示例9: Gist
public Gist(
ILogProvider logProvider,
ICacheProvider cacheProvider,
IAuthProvider authProvider)
: base(
logProvider,
cacheProvider,
authProvider) { }
示例10: SettingsController
public SettingsController(IUserService userService, IAuthProvider authProvider,
ILocationService locationService, IHash hash)
{
_userService = new UserServiceClient();
_authProvider = authProvider;
_locationService = new LocationServiceClient();
_hash = hash;
}
示例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()));
}
示例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"));
}
示例13: AbstractMasterDetailPage
protected AbstractMasterDetailPage (IAuthProvider ap) : base()
{
Icon = GetIcon();
this.ap = ap;
ShowPersonalPages (ap.AuthState.IsAuthorised);
ap.AuthState.OnAuthChange += OnAuthChange;
}
示例14: HomeController
public HomeController(IUsersManagement userManagement,
IAuthProvider authenticationProvider, IUserAccessHelper userAccessHelper, IAppraiserManagement appraiserManagement, ITaskManager taskManager)
{
_userManagement = userManagement;
_authenticationProvider = authenticationProvider;
_userAccessHelper = userAccessHelper;
_appraiserManagement = appraiserManagement;
_taskManager = taskManager;
}
示例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);
}