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


C# IAuthenticationService类代码示例

本文整理汇总了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);
		}
开发者ID:bpe78,项目名称:WpfExamples,代码行数:7,代码来源:AuthenticationViewModel.cs

示例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;
        }
开发者ID:ejimenezdelgado,项目名称:SmartStoreNET,代码行数:29,代码来源:WebWorkContext.cs

示例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;
        }
开发者ID:BackupTheBerlios,项目名称:seleon,代码行数:9,代码来源:NeighbourHandlers.cs

示例4: PostController

 public PostController(ViewManager viewManager, IAuthenticationService authenticationService, ICommandBus commandBus)
     : base(commandBus)
 {
     _postView = viewManager.GetView<IPostView>();
     _blogView = viewManager.GetView<IBlogView>();
     _authenticationService = authenticationService;
 }
开发者ID:mastoj,项目名称:NBlog,代码行数:7,代码来源:PostController.cs

示例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);});
        }
开发者ID:mmann2943,项目名称:berry-patch,代码行数:29,代码来源:AuthenticateUser.cs

示例6: AuthenticationFilter

 public AuthenticationFilter(IAuthenticationRedirector redirector, IAuthenticationService authentication, ICurrentChain currentChain, SecuritySettings settings)
 {
     _redirector = redirector;
     _authentication = authentication;
     _currentChain = currentChain;
     _settings = settings;
 }
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:7,代码来源:AuthenticationFilter.cs

示例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;
 }
开发者ID:rodmjay,项目名称:Ideal,代码行数:14,代码来源:AccountController.cs

示例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;
        }
开发者ID:Jetski5822,项目名称:NGM.CasClient,代码行数:25,代码来源:CASClient.cs

示例9: UserQueryService

 public UserQueryService(
     IMathHubDbContext MathHubDbContext,
     IAuthenticationService authenticationService)
 {
     ctx = MathHubDbContext.GetDbContext();
     this._authenticationService = authenticationService;
 }
开发者ID:hqt,项目名称:MathHub,代码行数:7,代码来源:UserQueryService.cs

示例10: AccountService

 public AccountService(IConfigurationWrapper configurationWrapper, ICommunicationService communicationService, IAuthenticationService authenticationService, ISubscriptionsService subscriptionService)
 {
     this._configurationWrapper = configurationWrapper;
     this._communicationService = communicationService;
     this._authenticationService = authenticationService;
     this._subscriptionsService = subscriptionService;
 }
开发者ID:plachmann,项目名称:crds-angular,代码行数:7,代码来源:AccountService.cs

示例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;
         }
     });
 }
开发者ID:uwe-e,项目名称:BSE.Tunes,代码行数:29,代码来源:PlayerManager.cs

示例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;
 }
开发者ID:pollingj,项目名称:Membrane-CMS,代码行数:14,代码来源:LoginController.cs

示例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"
            };

        }
开发者ID:plachmann,项目名称:crds-angular,代码行数:31,代码来源:DonorService.cs

示例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;
 }
开发者ID:491134648,项目名称:nopCommerce,代码行数:30,代码来源:ExternalAuthorizer.cs

示例15: SessionController

 public SessionController(IFormsAuthentication formsAuthentication, 
     IAuthenticationService authenticationService, IProductoService productoService)
 {
     this.formsAuthentication = formsAuthentication;
     this.authenticationService = authenticationService;
     this.productoService = productoService;
 }
开发者ID:sesquiv,项目名称:siacvu,代码行数:7,代码来源:SessionController.cs


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