本文整理汇总了C#中ILoginService类的典型用法代码示例。如果您正苦于以下问题:C# ILoginService类的具体用法?C# ILoginService怎么用?C# ILoginService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILoginService类属于命名空间,在下文中一共展示了ILoginService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Initialize
public void Initialize (ILoginService service, IConfigSource config, IRegistryCore registry)
{
IConfig loginServerConfig = config.Configs ["LoginService"];
if (loginServerConfig != null) {
m_UseTOS = loginServerConfig.GetBoolean ("UseTermsOfServiceOnFirstLogin", false);
m_TOSLocation = loginServerConfig.GetString ("FileNameOfTOS", "");
if (m_TOSLocation.Length > 0) {
// html appears to be broken
if (m_TOSLocation.ToLower ().StartsWith ("http://", StringComparison.Ordinal))
m_TOSLocation = m_TOSLocation.Replace ("ServersHostname", MainServer.Instance.HostName);
else {
var simBase = registry.RequestModuleInterface<ISimulationBase> ();
var TOSFileName = PathHelpers.VerifyReadFile (m_TOSLocation, ".txt", simBase.DefaultDataPath);
if (TOSFileName == "") {
m_UseTOS = false;
MainConsole.Instance.ErrorFormat ("Unable to locate the Terms of Service file : '{0}'", m_TOSLocation);
MainConsole.Instance.Error (" Show 'Terms of Service' for a new user login is disabled!");
} else
m_TOSLocation = TOSFileName;
}
} else
m_UseTOS = false;
}
m_AuthenticationService = registry.RequestModuleInterface<IAuthenticationService> ();
m_LoginService = service;
}
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:28,代码来源:BannedUserLoginModule.cs
示例2: UsersController
public UsersController(IUsersService usersService,
IUserAuthentication authentication,
ILoginService loginService)
: base(authentication, loginService)
{
this.usersService = usersService;
}
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:7,代码来源:UsersController.cs
示例3: OAuthTokenLoginViewModel
public OAuthTokenLoginViewModel(
ILoginService loginFactory,
IAccountsRepository accountsRepository,
IAlertDialogFactory alertDialogFactory)
{
Title = "Login";
var canLogin = this.WhenAnyValue(y => y.Token, (x) => !string.IsNullOrEmpty(x));
LoginCommand = ReactiveCommand.CreateAsyncTask(canLogin, async _ =>
{
try
{
using (alertDialogFactory.Activate("Logging in..."))
{
var account = await loginFactory.Authenticate(ApiDomain, WebDomain, Token, false);
await accountsRepository.SetDefault(account);
return account;
}
}
catch (UnauthorizedException)
{
throw new Exception("The provided token is invalid! Please try again or " +
"create a new token as this one might have been revoked.");
}
});
LoginCommand.Subscribe(x => MessageBus.Current.SendMessage(new LogoutMessage()));
}
开发者ID:runt18,项目名称:CodeHub,代码行数:28,代码来源:OAuthTokenLoginViewModel.cs
示例4: AccountController
/// <summary>
/// Initializes a new instance of the <see cref="AccountController"/> class.
/// </summary>
/// <param name="logger">Logger Service</param>
/// <param name="loginService">Login Service</param>
/// <param name="userService">User Service</param>
/// <param name="passwordService">Password Service</param>
public AccountController(
ILoggerService logger,
ILoginService loginService,
IUserService userService,
IPasswordService passwordService)
: base(logger)
{
if (loginService == null)
{
throw new ArgumentNullException("ILoginService, LoginController");
}
if (userService == null)
{
throw new ArgumentNullException("IUserService, LoginController");
}
if(passwordService == null)
{
throw new ArgumentNullException("IPasswordService, LoginController");
}
this._loginService = loginService;
this._userService = userService;
this._passwordService = passwordService;
}
开发者ID:kiran94,项目名称:travelme,代码行数:33,代码来源:AccountController.cs
示例5: BCProxyLoginController
public BCProxyLoginController(IPortalUserFacade portalUserFacade, ILoginService loginService, IFormsAuthenticationService formsAuthenticationService, IPortletTemplateFacade portletTemplateFacade)
{
_loginService = loginService;
_formsAuthenticationService = formsAuthenticationService;
_portletTemplateFacade = portletTemplateFacade;
_portalUserFacade = portalUserFacade;
}
开发者ID:Erls-Corporation,项目名称:BCProxyLoginPortlet,代码行数:7,代码来源:BCProxyLoginController.cs
示例6: OnCreate
protected override void OnCreate (Bundle bundle)
{
AppSettings.TrackingId = "UA-65892866-1";
AppSettings.RegisterTypes ();
Logger.Instance = new AndroidLogger ();
Mvx.RegisterType<IToastService, ToastService> ();
Mvx.RegisterType<IAnalyticsService, AnalyticsService> ();
base.OnCreate (bundle);
SetContentView (Resource.Layout.Main);
_apiService = Mvx.Resolve<IApiService> ();
_toastService = Mvx.Resolve<IToastService> ();
_loginService = Mvx.Resolve<ILoginService> ();
IsLoading = true;
CheckUserExists ();
Button button = FindViewById<Button> (Resource.Id.button_register);
button.Click += ClickHandler;
AppLocation.Current.LocationServiceConnected += (object sender, ServiceConnectedEventArgs e) => {
};
AppLocation.StartLocationService ();
}
开发者ID:bkmza,项目名称:goandfindme,代码行数:28,代码来源:MainActivity.cs
示例7: HomeController
public HomeController(IHomeDataService homeDataService, ILoginService loginService, IUsersService usersService, IActivitiesService activitiesService)
{
_homeDataService = homeDataService;
_loginService = loginService;
_usersService = usersService;
_activitiesService = activitiesService;
}
开发者ID:chettriashish,项目名称:Wadado,代码行数:7,代码来源:HomeController.cs
示例8: LoginViewModel
public LoginViewModel(IMessenger messenger, ILoginService loginService)
{
_messenger = messenger;
_loginService = loginService;
LoginCommand = new RelayCommand<object>(Login);
}
开发者ID:korchakmv,项目名称:warehouse,代码行数:7,代码来源:LoginViewModel.cs
示例9: AngelCourseService
public AngelCourseService(IEventAggregator eventAggregator, ILoginService loginService)
{
this.eventAggregator = eventAggregator;
this.loginService = loginService;
eventAggregator.GetEvent<LoginStatusChangedEvent>().Subscribe(GetCoursesForUser, ThreadOption.UIThread);
eventAggregator.GetEvent<ActiveCourseChangedEvent>().Subscribe(LoadCourse, ThreadOption.UIThread);
}
开发者ID:erwilleke,项目名称:ocu.angellight.code,代码行数:8,代码来源:AngelCourseService.cs
示例10: UserController
/// <summary>
/// Initializes a new instance of the <see cref="UserController"/> class.
/// </summary>
/// <param name="loginService">The login service.</param>
/// <param name="userService">The user service.</param>
/// <param name="emailService">The email service.</param>
public UserController(ILoginService loginService, ISubscriberService subscriberService,
IUserService userService, IEmailService emailService)
{
_loginService = loginService;
_userService = userService;
_emailService = emailService;
_subscriberService = subscriberService;
}
开发者ID:mrG7,项目名称:PTS,代码行数:14,代码来源:UserController.cs
示例11: OpmlImporterController
public OpmlImporterController(
IUserAuthentication authentication,
ILoginService loginService,
IOpmlImporterService opmlImporterService)
: base(authentication, loginService)
{
this.opmlImporterService = opmlImporterService;
}
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:8,代码来源:OpmlImporterController.cs
示例12: OrderPlacedService
public OrderPlacedService(IUserService userService, ILoginService loginService, ISession session,
IRegistrationService registrationService)
{
_userService = userService;
_loginService = loginService;
_session = session;
_registrationService = registrationService;
}
开发者ID:neozhu,项目名称:Ecommerce,代码行数:8,代码来源:OrderPlacedService.cs
示例13: AccountController
public AccountController(
IUserAuthentication authentication,
ILoginService loginService,
IAccountService accountService)
: base(authentication, loginService)
{
this.accountService = accountService;
}
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:8,代码来源:AccountController.cs
示例14: UsersController
public UsersController(IUsersService usersService,
IUserAuthentication authentication,
ILoginService loginService,
ISessionProvider sessionProvider)
: base(authentication, loginService, sessionProvider)
{
this.usersService = usersService;
}
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:8,代码来源:UsersController.cs
示例15: StreamController
public StreamController(
IUserAuthentication authentication,
ILoginService loginService,
IRssSubscriptionService rssSubscriptionService)
: base(authentication, loginService)
{
this.rssSubscriptionService = rssSubscriptionService;
}
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:8,代码来源:StreamController.cs
示例16: HomeController
public HomeController(
IUserAuthentication authentication,
ILoginService loginService,
ISessionProvider sessionProvider,
IRssChannelsRepository rssRepository)
: base(authentication, loginService, sessionProvider)
{
this.rssRepository = rssRepository;
}
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:9,代码来源:HomeController.cs
示例17: MainWindowViewModel
public MainWindowViewModel(
ILoginService loginService,
IBitBucketClient bitBucketClient,
IUserService userService)
{
this.loginService = loginService;
this.bitBucketClient = bitBucketClient;
this.userService = userService;
}
开发者ID:jmalczak,项目名称:Internal.BitBucketBrowser,代码行数:9,代码来源:MainWindowViewModel.cs
示例18: AdminLoginModule
public AdminLoginModule(ILoginService loginService, IDocumentStore store)
: base("/admin")
{
this.RequiresInstallerDisabled(() => store.OpenSession());
this.RequiresHttpsOrXProto();
Get["/login"] =
parameters =>
{
using (IDocumentSession session = store.OpenSession())
{
SiteSettings site = session.GetSiteSettings();
if (site == null)
{
site = new SiteSettings
{
Title = "Admin",
SubTitle = "Go to Site -> Settings"
};
}
return View["admin/login", new
{
site.Title,
SubTitle = "Login"
}];
}
};
Get["/logout"] = parameters =>
{
// Called when the user clicks the sign out button in the application. Should
// perform one of the Logout actions (see below)
return View["admin/logout"];
};
Post["/login"] = parameters =>
{
// Called when the user submits the contents of the login form. Should
// validate the user based on the posted form data, and perform one of the
// Login actions (see below)
var loginParameters = this.Bind<LoginParameters>();
User user;
if (!loginService.Login(loginParameters.UserName, loginParameters.Password, out user))
{
return global::System.Net.HttpStatusCode.Unauthorized;
}
return this.LoginAndRedirect(
user.Identifier,
fallbackRedirectUrl: "/admin",
cookieExpiry: DateTime.Now.AddHours(1));
};
}
开发者ID:pekkah,项目名称:tanka,代码行数:57,代码来源:AdminLoginModule.cs
示例19: LoginViewModel
public LoginViewModel(ILoginService loginService, IDialogService dialogService)
{
_loginService = loginService;
_dialogService = dialogService;
Username = "TestUser";
Password = "YouCantSeeMe";
IsLoading = false;
}
开发者ID:Dexyon,项目名称:MvvmCross-Samples,代码行数:9,代码来源:LoginViewModel.cs
示例20: AdminController
public AdminController(
IUserAuthentication authentication,
ILoginService loginService,
IAdminService adminService,
IUpdateService updateService)
: base(authentication, loginService)
{
this.adminService = adminService;
this.updateService = updateService;
}
开发者ID:jstadnicki,项目名称:isthereanynews,代码行数:10,代码来源:AdminController.cs
注:本文中的ILoginService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论