• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IAuthentication类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: MembershipController

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


示例17: AuthController

 public AuthController(
     ICurrentUser currentUser,
     IAuthentication authentication)
 {
     _currentUser = currentUser;
     _authentication = authentication;
 }
开发者ID:ahaydara,项目名称:html5_learning,代码行数:7,代码来源:AuthController.cs


示例18: ApplicationController

        protected ApplicationController(IUserProfileRepository userProfileRepository, IAuthentication authentication)
        {
            Requires.NotNull(userProfileRepository, "userProfileRepository");
            Requires.NotNull(authentication, "authentication");

            this.UserProfileRepository = userProfileRepository;
            this.Authentication = authentication;
        }
开发者ID:marijngiesen,项目名称:qoam,代码行数:8,代码来源:ApplicationController.cs


示例19: AuthenticateEndpoint

 public AuthenticateEndpoint(IEndpoint endpoint, IAuthenticationRuleCollection authenticationRuleCollection, IAuthentication authentication, 
     IOutputWriter outputWriter)
 {
     this.endpoint = endpoint;
     this.authenticationRuleCollection = authenticationRuleCollection;
     this.authentication = authentication;
     this.outputWriter = outputWriter;
 }
开发者ID:UStack,项目名称:UWeb,代码行数:8,代码来源:AuthenticateEndpoint.cs


示例20: ShoppingCartViewModelBuilder

 public ShoppingCartViewModelBuilder(IShoppingCart shoppingCart, IJewelRepository jewelRepository, CartItemViewModelBuilder cartItemViewModelBuilder, IAuthentication authentication, IMappingEngine mapper)
 {
     this.shoppingCart = shoppingCart;
     this.jewelRepository = jewelRepository;
     this.cartItemViewModelBuilder = cartItemViewModelBuilder;
     this.authentication = authentication;
     this.mapper = mapper;
 }
开发者ID:mamluka,项目名称:JewelryONet,代码行数:8,代码来源:ShoppingCartViewModelBuilder.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IAuthenticationContext类代码示例发布时间:2022-05-24
下一篇:
C# IAuthTokens类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap