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


C# IAuthentication类代码示例

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


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

示例1: BaseController

 public BaseController()
 {
     _mail = new MailSandler();
     _repository = DependencyResolver.Current.GetService<IRepository>();
    _mapper = DependencyResolver.Current.GetService<IMapper>();
    _auth = DependencyResolver.Current.GetService<IAuthentication>();
 }
开发者ID:SamosadovArtem,项目名称:Samasadau_VetClinic,代码行数:7,代码来源:BaseController.cs

示例2: InstitutionsController

        public InstitutionsController(IInstitutionRepository institutionRepository, IBaseScoreCardRepository baseScoreCardRepository, IValuationScoreCardRepository valuationScoreCardRepository, IUserProfileRepository userProfileRepository, IAuthentication authentication)
            : base(baseScoreCardRepository, valuationScoreCardRepository, userProfileRepository, authentication)
        {
            Requires.NotNull(institutionRepository, nameof(institutionRepository));

            this.institutionRepository = institutionRepository;
        }
开发者ID:spapaseit,项目名称:qoam,代码行数:7,代码来源:InstitutionsController.cs

示例3: AdminBaseController

        public AdminBaseController( IAuthentication authentication = null)
        {
            

            // Allows us to injects a IUserHelper in unit tests
            Authentication = authentication ?? DependencyManager.Authentication;
        }
开发者ID:jessetinell,项目名称:imenyn.se,代码行数:7,代码来源:AdminBaseController.cs

示例4: LogOn

        /// <summary>
        /// Logs on with specified authentication method.
        /// </summary>
        /// <param name="authentication">The authentication method.</param>
        /// <returns></returns>
        /// <exception cref="System.InvalidOperationException">
        /// Already logged on
        /// or
        /// Another unfinished log on/off request exists.
        /// </exception>
        /// <exception cref="System.Exception">Null user info is not allowed</exception>
        public async Task LogOn(IAuthentication authentication)
        {

            if (UserInfo != null)
            {
                throw new InvalidOperationException("Already logged on");
            }
            if (Interlocked.CompareExchange(ref IsWorking, 1, 0) == 0)
            {
                try
                {
                    var result = await authentication.Authenticate();
                    if (result == null)
                    {
                        throw new Exception("Null user info is not allowed");
                    }
                    UserInfo = result;
                    ServerConnection.AccessToken = UserInfo.AccessToken;
                    return;
                }
                finally
                {
                    Interlocked.CompareExchange(ref IsWorking, 0, 1);
                }
            }
            throw new InvalidOperationException("Another unfinished log on/off request exists.");
        }
开发者ID:alexguo88,项目名称:Kfstorm.DoubanFM.Core,代码行数:38,代码来源:Session.cs

示例5: BaseController

        public BaseController(IDb db, ILogger logger, IAuthentication authentication = null)
        {
            Db = db;
            Logger = logger;

            Authentication = authentication ?? DependencyManager.Authentication;
        }
开发者ID:jessetinell,项目名称:imenyn.se,代码行数:7,代码来源:BaseController.cs

示例6: FeaturedController

 public FeaturedController(IUserService userService, IAuthentication authentication, IListingService listingService, IFeaturedService featuredService)
 {
     _userService = userService;
     _authentication = authentication;
     _listingService = listingService;
     _featuredService = featuredService;
 }
开发者ID:xuantranm,项目名称:DigitalMarket,代码行数:7,代码来源:FeaturedController.cs

示例7: MapModule

 public MapModule(IRegionManager regionManager, IAuthentication authentication, IEventAggregator eventAggregator)
 {
     this.regionManager = regionManager;
     this.authentication = authentication;
     if (eventAggregator != null)
         eventAggregator.GetEvent<CompositePresentationEvent<LogonData>>().Subscribe(OnLogonChanged);
 }
开发者ID:jpenet,项目名称:WebArcMap,代码行数:7,代码来源:MapModule.cs

示例8: PromotionController

 public PromotionController(IUserService userService, IAuthentication authentication, IListingService listingService, IPromotionService promotionService)
 {
     _userService = userService;
     _authentication = authentication;
     _listingService = listingService;
     _promotionService = promotionService;
 }
开发者ID:xuantranm,项目名称:DigitalMarket,代码行数:7,代码来源:PromotionController.cs

示例9: QoamCornersController

 public QoamCornersController(IBaseScoreCardRepository baseScoreCardRepository, IValuationScoreCardRepository valuationScoreCardRepository, IUserProfileRepository userProfileRepository, IAuthentication authentication, IJournalRepository journalRepository, ICornerRepository cornerRepository, IBulkImporter<CornerToImport> bulkImporter)
     : base(baseScoreCardRepository, valuationScoreCardRepository, userProfileRepository, authentication)
 {
     _journalRepository = journalRepository;
     _cornerRepository = cornerRepository;
     _bulkImporter = bulkImporter;
 }
开发者ID:spapaseit,项目名称:qoam,代码行数:7,代码来源:QoamCornersController.cs

示例10: AdminController

        public AdminController(JournalsImport journalsImport, UlrichsImport ulrichsImport, DoajImport doajImport, JournalTocsImport journalsTocImport, JournalsExport journalsExport, IJournalRepository journalRepository, IUserProfileRepository userProfileRepository, IAuthentication authentication, IInstitutionRepository institutionRepository, IBlockedISSNRepository blockedIssnRepository, IBaseScoreCardRepository baseScoreCardRepository, IValuationScoreCardRepository valuationScoreCardRepository, IBulkImporter<SubmissionPageLink> bulkImporter, IBulkImporter<Institution> institutionImporter)
            : base(baseScoreCardRepository, valuationScoreCardRepository, userProfileRepository, authentication)
        {
            Requires.NotNull(journalsImport, nameof(journalsImport));
            Requires.NotNull(ulrichsImport, nameof(ulrichsImport));
            Requires.NotNull(journalsTocImport, nameof(journalsTocImport));
            Requires.NotNull(doajImport, nameof(doajImport));
            Requires.NotNull(journalsExport, nameof(journalsExport));
            Requires.NotNull(journalRepository, nameof(journalRepository));
            Requires.NotNull(institutionRepository, nameof(institutionRepository));
            Requires.NotNull(blockedIssnRepository, nameof(blockedIssnRepository));
            Requires.NotNull(bulkImporter, nameof(bulkImporter));
            Requires.NotNull(institutionImporter, nameof(institutionImporter));

            this.journalsImport = journalsImport;
            this.ulrichsImport = ulrichsImport;
            this.doajImport = doajImport;
            _journalsTocImport = journalsTocImport;
            this.journalsExport = journalsExport;
            this.journalRepository = journalRepository;
            this.institutionRepository = institutionRepository;
            this.blockedIssnRepository = blockedIssnRepository;

            _bulkImporter = bulkImporter;
            _institutionImporter = institutionImporter;
        }
开发者ID:spapaseit,项目名称:qoam,代码行数:26,代码来源:AdminController.cs

示例11: TextClient

		/// <summary>
		/// 
		/// </summary>
		/// <param name="authentication"></param>
		/// <param name="hasCommentary"></param>
		/// <param name="hasContext"></param>
		public TextClient(IAuthentication authentication, bool hasCommentary, bool hasContext)
			: base(authentication)
		{
			_authentication = authentication;
			HasCommentary = hasCommentary;
			HasContext = hasContext;
		}
开发者ID:orenfromberg,项目名称:sefariadotnet,代码行数:13,代码来源:TextClient.cs

示例12: BillingViewModelBuilder

 public BillingViewModelBuilder(CheckoutDetailsModel checkoutDetailsModel, IAuthentication authentication,ICustomerAccountService accountService, IMappingEngine mapper)
 {
     this.checkoutDetailsModel = checkoutDetailsModel;
     this.authentication = authentication;
     this.accountService = accountService;
     this.mapper = mapper;
 }
开发者ID:mamluka,项目名称:JewelryONet,代码行数:7,代码来源:BillingViewModelBuilder.cs

示例13: ChangeAuthentication

        /// <summary>
        /// Updates the authentication that this Client uses.
        /// </summary>
        /// <param name="authentication">The authentication to put into this Client.</param>
        public void ChangeAuthentication(IAuthentication authentication)
        {
            if (authentication.AuthenticationType != AuthenticationType.ClientId)
                throw new NotImplementedException();

            Authentication = authentication;
        }
开发者ID:0xdeafcafe,项目名称:ImgurNet,代码行数:11,代码来源:Imgur.cs

示例14: HttpAuth

 public HttpAuth(
     IPrincipalFactory principalFactory,
     IAuthentication authentication)
 {
     this.PrincipalFactory = principalFactory;
     this.Authentication = authentication;
 }
开发者ID:nutrija,项目名称:revenj,代码行数:7,代码来源:HttpAuth.cs

示例15: ScoreController

        public ScoreController(IBaseScoreCardRepository baseScoreCardRepository, IBaseJournalPriceRepository baseJournalPriceRepository, IValuationScoreCardRepository valuationScoreCardRepository, IValuationJournalPriceRepository valuationJournalPriceRepository, IScoreCardVersionRepository scoreCardVersionRepository, IJournalRepository journalRepository, ILanguageRepository languageRepository, ISubjectRepository subjectRepository, IQuestionRepository questionRepository, GeneralSettings generalSettings, IUserProfileRepository userProfileRepository, IInstitutionRepository institutionRepository, IAuthentication authentication)
            : base(userProfileRepository, authentication)
        {
            Requires.NotNull(baseScoreCardRepository, "baseScoreCardRepository");
            Requires.NotNull(baseJournalPriceRepository, "baseJournalPriceRepository");
            Requires.NotNull(valuationScoreCardRepository, "valuationScoreCardRepository");
            Requires.NotNull(valuationJournalPriceRepository, "valuationJournalPriceRepository");
            Requires.NotNull(scoreCardVersionRepository, "scoreCardVersionRepository");
            Requires.NotNull(journalRepository, "journalRepository");
            Requires.NotNull(languageRepository, "languageRepository");
            Requires.NotNull(subjectRepository, "keywordRepository");
            Requires.NotNull(questionRepository, "questionRepository");
            Requires.NotNull(institutionRepository, "institutionRepository");
            Requires.NotNull(generalSettings, "generalSettings");

            this.baseScoreCardRepository = baseScoreCardRepository;
            this.scoreCardVersionRepository = scoreCardVersionRepository;
            this.valuationJournalPriceRepository = valuationJournalPriceRepository;
            this.valuationScoreCardRepository = valuationScoreCardRepository;
            this.journalRepository = journalRepository;
            this.languageRepository = languageRepository;
            this.subjectRepository = subjectRepository;
            this.questionRepository = questionRepository;
            this.baseJournalPriceRepository = baseJournalPriceRepository;
            this.institutionRepository = institutionRepository;
            this.generalSettings = generalSettings;
        }
开发者ID:marijngiesen,项目名称:qoam,代码行数:27,代码来源:ScoreController.cs


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