本文整理汇总了C#中IAuthenticationService类的典型用法代码示例。如果您正苦于以下问题:C# IAuthenticationService类的具体用法?C# IAuthenticationService怎么用?C# IAuthenticationService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IAuthenticationService类属于命名空间,在下文中一共展示了IAuthenticationService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AuthenticationViewModel
public AuthenticationViewModel(IAuthenticationService authenticationService)
{
_authenticationService = authenticationService;
_loginCommand = new DelegateCommand(Login, CanLogin);
_logoutCommand = new DelegateCommand(Logout, CanLogout);
_showViewCommand = new DelegateCommand(ShowView, null);
}
示例2: WebWorkContext
public WebWorkContext(Func<string, ICacheManager> cacheManager,
HttpContextBase httpContext,
ICustomerService customerService,
IStoreContext storeContext,
IAuthenticationService authenticationService,
ILanguageService languageService,
ICurrencyService currencyService,
IGenericAttributeService attrService,
TaxSettings taxSettings, CurrencySettings currencySettings,
LocalizationSettings localizationSettings, Lazy<ITaxService> taxService,
IStoreService storeService, ISettingService settingService,
IUserAgent userAgent)
{
this._cacheManager = cacheManager("static");
this._httpContext = httpContext;
this._customerService = customerService;
this._storeContext = storeContext;
this._authenticationService = authenticationService;
this._languageService = languageService;
this._attrService = attrService;
this._currencyService = currencyService;
this._taxSettings = taxSettings;
this._taxService = taxService;
this._currencySettings = currencySettings;
this._localizationSettings = localizationSettings;
this._storeService = storeService;
this._settingService = settingService;
this._userAgent = userAgent;
}
示例3: NeighbourPostHandler
// TODO: unused: private bool m_AllowForeignGuests;
public NeighbourPostHandler(INeighbourService service, IAuthenticationService authentication) :
base("POST", "/region")
{
m_NeighbourService = service;
m_AuthenticationService = authentication;
// TODO: unused: m_AllowForeignGuests = foreignGuests;
}
示例4: PostController
public PostController(ViewManager viewManager, IAuthenticationService authenticationService, ICommandBus commandBus)
: base(commandBus)
{
_postView = viewManager.GetView<IPostView>();
_blogView = viewManager.GetView<IBlogView>();
_authenticationService = authenticationService;
}
示例5: verify_receive_appropriate_error_message_when_user_provides_a_bad_user_name_or_password
public void verify_receive_appropriate_error_message_when_user_provides_a_bad_user_name_or_password()
{
AuthenticationStatus authStatus = null;
Story authenticateUserStory = new Story("Authenticate User");
authenticateUserStory.AsA("Unauthenticated user")
.IWant("supply my user name and password to the login form")
.SoThat("I can authenticate to the application");
authenticateUserStory
.WithScenario("User provides an invalid user name")
.Given("My user name and password are ", "Big Daddy", "Gobldegook", delegate(string userName, string password) { UserRepositoryFactory factory = _mock.DynamicMock<UserRepositoryFactory>();
using (_mock.Record())
{
Expect.Call(factory.Create(userName, password))
.Return(_mock.DynamicMock<IUserRepository>());
}
_user = factory.Create(userName, password); })
.When("I authenticate the user", delegate {_service = _mock.DynamicMock<IAuthenticationService>();
using (_mock.Record())
{
Expect.Call(_service.Authenticate(_user))
.Return(new AuthenticationStatus(new Exception("Bad Username or Password")));
}
authStatus = _service.Authenticate(_user);})
.Then("I should receive an Authentication status of", Status.Failed, delegate(Status expectedStatus) {Assert.AreEqual(expectedStatus, authStatus.Status);});
}
示例6: AuthenticationFilter
public AuthenticationFilter(IAuthenticationRedirector redirector, IAuthenticationService authentication, ICurrentChain currentChain, SecuritySettings settings)
{
_redirector = redirector;
_authentication = authentication;
_currentChain = currentChain;
_settings = settings;
}
示例7: AccountController
/// <summary>
/// Initializes a new instance of the <see cref="AccountController"/> class.
/// </summary>
/// <param name="userService">The user service.</param>
/// <param name="authenticationService">The authentication service.</param>
/// <param name="messageBus">The message bus.</param>
/// <param name="membershipSettings"></param>
public AccountController(IUserAccountService userService, IAuthenticationService authenticationService, IMessageBus messageBus, IMembershipSettings membershipSettings)
{
_membershipSettings = membershipSettings;
_messageBus = messageBus;
_userService = userService;
_authenticationService = authenticationService;
}
示例8: CASClient
public CASClient(
ShellSettings settings,
ITicketValidatorFactory ticketValidatorFactory,
IRequestEvaluator requestEvaluator,
IClock clock,
IUrlUtil urlUtil,
IAuthenticationService authenticationService,
ICasServices casServices) {
_settings = settings;
_ticketValidatorFactory = ticketValidatorFactory;
_requestEvaluator = requestEvaluator;
_clock = clock;
_urlUtil = urlUtil;
_authenticationService = authenticationService;
_casServices = casServices;
_xmlNamespaceManager = new XmlNamespaceManager(_xmlNameTable);
_xmlNamespaceManager.AddNamespace("cas", "http://www.yale.edu/tp/cas");
_xmlNamespaceManager.AddNamespace("saml", "urn: oasis:names:tc:SAML:1.0:assertion");
_xmlNamespaceManager.AddNamespace("saml2", "urn: oasis:names:tc:SAML:1.0:assertion");
_xmlNamespaceManager.AddNamespace("samlp", "urn: oasis:names:tc:SAML:1.0:protocol");
Logger = NullLogger.Instance;
T = NullLocalizer.Instance;
}
示例9: UserQueryService
public UserQueryService(
IMathHubDbContext MathHubDbContext,
IAuthenticationService authenticationService)
{
ctx = MathHubDbContext.GetDbContext();
this._authenticationService = authenticationService;
}
示例10: AccountService
public AccountService(IConfigurationWrapper configurationWrapper, ICommunicationService communicationService, IAuthenticationService authenticationService, ISubscriptionsService subscriptionService)
{
this._configurationWrapper = configurationWrapper;
this._communicationService = communicationService;
this._authenticationService = authenticationService;
this._subscriptionsService = subscriptionService;
}
示例11: PlayerManager
public PlayerManager(IDataService dataService, IAuthenticationService accountService, IPlayerService playerService, IDialogService dialogservice, IResourceService resourceService)
{
this.m_dataService = dataService;
this.m_accountService = accountService;
this.PlayerService = playerService;
this.m_dialogService = dialogservice;
this.m_resourceService = resourceService;
Messenger.Default.Register<MediaStateChangedArgs>(this, args =>
{
switch (args.MediaState)
{
case MediaState.Opened:
OnMediaOpened();
break;
case MediaState.Ended:
this.OnMediaEnded();
break;
case MediaState.NextRequested:
ExecuteNextTrack();
break;
case MediaState.PreviousRequested:
ExecutePreviousTrack();
break;
case MediaState.DownloadCompleted:
PrepareNextTrack();
break;
}
});
}
示例12: LoginController
/// <summary>
/// Constructor
/// </summary>
/// <param name="authenticationService">The <see cref="AuthenticationService"/></param>
/// <param name="pluginsService">The <see cref="Core.Services.PluginsService"/></param>
/// <param name="cultureService">The <see cref="Core.Services.CultureService"/></param>
/// <param name="formsAuthentication">The <see cref="FormsAuthentication"/> wrapper</param>
public LoginController(IAuthenticationService authenticationService, IPluginsService pluginsService, ICultureService cultureService, IFormsAuthentication formsAuthentication)
{
this.authenticationService = authenticationService;
this.pluginsService = pluginsService;
this.cultureService = cultureService;
this.formsAuthentication = formsAuthentication;
}
示例13: DonorService
public DonorService(IMinistryPlatformService ministryPlatformService, IProgramService programService, ICommunicationService communicationService, IAuthenticationService authenticationService, IContactService contactService, IConfigurationWrapper configuration, ICryptoProvider crypto)
: base(authenticationService, configuration)
{
_ministryPlatformService = ministryPlatformService;
_programService = programService;
_communicationService = communicationService;
_contactService = contactService;
_crypto = crypto;
_donorPageId = configuration.GetConfigIntValue("Donors");
_donationPageId = configuration.GetConfigIntValue("Donations");
_donationDistributionPageId = configuration.GetConfigIntValue("Distributions");
_donorAccountsPageId = configuration.GetConfigIntValue("DonorAccounts");
_findDonorByAccountPageViewId = configuration.GetConfigIntValue("FindDonorByAccountPageView");
_donationStatusesPageId = configuration.GetConfigIntValue("DonationStatus");
_donorLookupByEncryptedAccount = configuration.GetConfigIntValue("DonorLookupByEncryptedAccount");
_myHouseholdDonationDistributions = configuration.GetConfigIntValue("MyHouseholdDonationDistributions");
_recurringGiftBySubscription = configuration.GetConfigIntValue("RecurringGiftBySubscription");
_recurringGiftPageId = configuration.GetConfigIntValue("RecurringGifts");
_myDonorPageId = configuration.GetConfigIntValue("MyDonor");
_myHouseholdDonationRecurringGifts = configuration.GetConfigIntValue("MyHouseholdDonationRecurringGifts");
_myHouseholdRecurringGiftsApiPageView = configuration.GetConfigIntValue("MyHouseholdRecurringGiftsApiPageView");
_myHouseholdPledges = configuration.GetConfigIntValue("MyHouseholdPledges");
_dateTimeFormat = new DateTimeFormatInfo
{
AMDesignator = "am",
PMDesignator = "pm"
};
}
示例14: ExternalAuthorizer
public ExternalAuthorizer(IAuthenticationService authenticationService,
IOpenAuthenticationService openAuthenticationService,
IGenericAttributeService genericAttributeService,
ICustomerRegistrationService customerRegistrationService,
ICustomerActivityService customerActivityService,
ILocalizationService localizationService,
IWorkContext workContext,
IStoreContext storeContext,
CustomerSettings customerSettings,
ExternalAuthenticationSettings externalAuthenticationSettings,
IShoppingCartService shoppingCartService,
IWorkflowMessageService workflowMessageService,
IEventPublisher eventPublisher,
LocalizationSettings localizationSettings)
{
this._authenticationService = authenticationService;
this._openAuthenticationService = openAuthenticationService;
this._genericAttributeService = genericAttributeService;
this._customerRegistrationService = customerRegistrationService;
this._customerActivityService = customerActivityService;
this._localizationService = localizationService;
this._workContext = workContext;
this._storeContext = storeContext;
this._customerSettings = customerSettings;
this._externalAuthenticationSettings = externalAuthenticationSettings;
this._shoppingCartService = shoppingCartService;
this._workflowMessageService = workflowMessageService;
this._eventPublisher = eventPublisher;
this._localizationSettings = localizationSettings;
}
示例15: SessionController
public SessionController(IFormsAuthentication formsAuthentication,
IAuthenticationService authenticationService, IProductoService productoService)
{
this.formsAuthentication = formsAuthentication;
this.authenticationService = authenticationService;
this.productoService = productoService;
}