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


C# ICredentialStore类代码示例

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


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

示例1: EncryptedLocalDiskReaderWriter

 public EncryptedLocalDiskReaderWriter([NotNull] IFileEncryptor fileEncryptor, [NotNull] ICredentialStore credentialStore)
 {
     if (fileEncryptor == null) throw new ArgumentNullException(nameof(fileEncryptor));
     if (credentialStore == null) throw new ArgumentNullException(nameof(credentialStore));
     this.fileEncryptor = fileEncryptor;
     this.credentialStore = credentialStore;
 }
开发者ID:Benrnz,项目名称:BudgetAnalyser,代码行数:7,代码来源:EncryptedLocalDiskReaderWriter.cs

示例2: UploadCommand

 public UploadCommand(IMessageObserver observer, IGoulRequestHandler gRequestHandler, ICredentialStore credentialStore, IRefreshTokenStore refreshStore)
 {
     mObserver = observer;
       mHandler = gRequestHandler;
       mCredentialStore = credentialStore;
       mRefreshStore = refreshStore;
 }
开发者ID:asipe,项目名称:Goul,代码行数:7,代码来源:UploadCommand.cs

示例3: BasicAuthentication

        /// <summary>
        /// Creates a new <see cref="BasicAuthentication"/> object with an underlying credential store.
        /// </summary>
        /// <param name="credentialStore">
        /// The <see cref="ICredentialStore"/> to delegate to.
        /// </param>
        public BasicAuthentication(ICredentialStore credentialStore)
        {
            if (credentialStore == null)
                throw new ArgumentNullException("credentialStore", "The `credentialStore` parameter is null or invalid.");

            this.CredentialStore = credentialStore;
        }
开发者ID:dongruiqing,项目名称:Git-Credential-Manager-for-Windows,代码行数:13,代码来源:BasicAuthentication.cs

示例4: GithubAuthentication

        /// <summary>
        /// 
        /// </summary>
        /// <param name="tokenScope"></param>
        /// <param name="personalAccessTokenStore"></param>
        public GithubAuthentication(
            GithubTokenScope tokenScope,
            ICredentialStore personalAccessTokenStore,
            AcquireCredentialsDelegate acquireCredentialsCallback,
            AcquireAuthenticationCodeDelegate acquireAuthenticationCodeCallback,
            AuthenticationResultDelegate authenticationResultCallback)
        {
            if (tokenScope == null)
                throw new ArgumentNullException("tokenScope", "The parameter `tokenScope` is null or invalid.");
            if (personalAccessTokenStore == null)
                throw new ArgumentNullException("personalAccessTokenStore", "The parameter `personalAccessTokenStore` is null or invalid.");
            if (acquireCredentialsCallback == null)
                throw new ArgumentNullException("acquireCredentialsCallback", "The parameter `acquireCredentialsCallback` is null or invalid.");
            if (acquireAuthenticationCodeCallback == null)
                throw new ArgumentNullException("acquireAuthenticationCodeCallback", "The parameter `acquireAuthenticationCodeCallback` is null or invalid.");

            TokenScope = tokenScope;

            PersonalAccessTokenStore = personalAccessTokenStore;
            GithubAuthority = new GithubAuthority();

            AcquireCredentialsCallback = acquireCredentialsCallback;
            AcquireAuthenticationCodeCallback = acquireAuthenticationCodeCallback;
            AuthenticationResultCallback = authenticationResultCallback;
        }
开发者ID:dongruiqing,项目名称:Git-Credential-Manager-for-Windows,代码行数:30,代码来源:GitHubAuthentication.cs

示例5: AuthorizeCommand

 public AuthorizeCommand(IMessageObserver observer, IRefreshTokenStore refreshStorage, ICredentialStore credentialStore, IGoulRequestHandler handler)
 {
     mObserver = observer;
       mRefreshStorage = refreshStorage;
       mCredStore = credentialStore;
       mHandler = handler;
 }
开发者ID:asipe,项目名称:Goul,代码行数:7,代码来源:AuthorizeCommand.cs

示例6: AccountService

 public AccountService(IIdentityService identityService, ISuspensionManagerState suspensionManagerState, ICredentialStore credentialStore)
 {
     _identityService = identityService;
     _suspensionManagerState = suspensionManagerState;
     _credentialStore = credentialStore;
     if (_suspensionManagerState != null)
     {
         if (_suspensionManagerState.SessionState.ContainsKey(ServerCookieHeaderKey))
         {
             _serverCookieHeader = _suspensionManagerState.SessionState[ServerCookieHeaderKey] as string;
         }
         if (_suspensionManagerState.SessionState.ContainsKey(SignedInUserKey))
         {
             _signedInUser = _suspensionManagerState.SessionState[SignedInUserKey] as UserInfo;
         }
         if (_suspensionManagerState.SessionState.ContainsKey(UserNameKey))
         {
             _userName = _suspensionManagerState.SessionState[UserNameKey].ToString();
         }
         if (_suspensionManagerState.SessionState.ContainsKey(PasswordKey))
         {
             _password = _suspensionManagerState.SessionState[PasswordKey].ToString();
         }
     }
 }
开发者ID:stevenh77,项目名称:ItineraryHunter-Win8,代码行数:25,代码来源:AccountService.cs

示例7: GetAuthentication

        /// <summary>
        /// Gets a configured authentication object for 'github.com'.
        /// </summary>
        /// <param name="targetUri">The uniform resource indicator of the resource which requires 
        /// authentication.</param>
        /// <param name="tokenScope">The desired scope of any personal access tokens aqcuired.</param>
        /// <param name="personalAccessTokenStore">A secure secret store for any personal access 
        /// tokens acquired.</param>
        /// <param name="authentication">(out) The authenitcation object if successful.</param>
        /// <returns>True if success; otherwise false.</returns>
        public static bool GetAuthentication(
            Uri targetUri,
            GithubTokenScope tokenScope,
            ICredentialStore personalAccessTokenStore,
            out BaseAuthentication authentication)
        {
            const string GitHubBaseUrlHost = "github.com";

            BaseSecureStore.ValidateTargetUri(targetUri);
            if (personalAccessTokenStore == null)
                throw new ArgumentNullException("personalAccessTokenStore", "The `personalAccessTokenStore` is null or invalid.");

            Trace.WriteLine("GithubAuthentication::GetAuthentication");

            if (targetUri.DnsSafeHost.EndsWith(GitHubBaseUrlHost, StringComparison.OrdinalIgnoreCase))
            {
                authentication = new GithubAuthentication(tokenScope, personalAccessTokenStore);
                Trace.WriteLine("   authentication for GitHub created");
            }
            else
            {
                authentication = null;
                Trace.WriteLine("   not github.com, authentication creation aborted");
            }

            return authentication != null;
        }
开发者ID:haikyuu,项目名称:Git-Credential-Manager-for-Windows,代码行数:37,代码来源:GitHubAuthentication.cs

示例8: ApplicationDatabaseService

        public ApplicationDatabaseService(
            [NotNull] IApplicationDatabaseRepository applicationRepository,
            [NotNull] IEnumerable<ISupportsModelPersistence> databaseDependents,
            [NotNull] MonitorableDependencies monitorableDependencies,
            [NotNull] ICredentialStore credentialStore,
            [NotNull] ILogger logger)
        {
            if (applicationRepository == null)
            {
                throw new ArgumentNullException(nameof(applicationRepository));
            }

            if (databaseDependents == null)
            {
                throw new ArgumentNullException(nameof(databaseDependents));
            }

            if (monitorableDependencies == null) throw new ArgumentNullException(nameof(monitorableDependencies));
            if (credentialStore == null) throw new ArgumentNullException(nameof(credentialStore));
            if (logger == null) throw new ArgumentNullException(nameof(logger));

            this.applicationRepository = applicationRepository;
            this.monitorableDependencies = monitorableDependencies;
            this.credentialStore = credentialStore;
            this.logger = logger;
            this.databaseDependents = databaseDependents.OrderBy(d => d.LoadSequence).ToList();
            this.monitorableDependencies.NotifyOfDependencyChange<IApplicationDatabaseService>(this);
            InitialiseDirtyDataTable();
        }
开发者ID:Benrnz,项目名称:BudgetAnalyser,代码行数:29,代码来源:ApplicationDatabaseService.cs

示例9: VstsAadAuthentication

 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 internal VstsAadAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority vstsAuthority)
     : base(personalAccessTokenStore,
            vstsIdeTokenCache,
            vstsAuthority)
 { }
开发者ID:Microsoft,项目名称:Git-Credential-Manager-for-Windows,代码行数:11,代码来源:VstsAadAuthentication.cs

示例10: SecretCache

        internal SecretCache(ICredentialStore credentialStore)
        {
            if (credentialStore == null)
                throw new ArgumentNullException(nameof(credentialStore));

            _namespace = credentialStore.Namespace;
            _getTargetName = credentialStore.UriNameConversion;
        }
开发者ID:Microsoft,项目名称:Git-Credential-Manager-for-Windows,代码行数:8,代码来源:SecretCache.cs

示例11: GetAuthorizationUrlCommand

 public GetAuthorizationUrlCommand(IMessageObserver observer,
                               ICredentialStore credentialStore,
                               IGoulRequestHandler handler)
 {
     mObserver = observer;
       mCredentialStore = credentialStore;
       mHandler = handler;
 }
开发者ID:asipe,项目名称:Goul,代码行数:8,代码来源:GetAuthorizationUrlCommand.cs

示例12: CredentialService

        public CredentialService(ICredentialStore store, IMailSender mailSender,
			IContentTypeManager contentTypeManager,
			IPersister persister)
        {
            _store = store;
            _mailSender = mailSender;
            _contentTypeManager = contentTypeManager;
            _persister = persister;
        }
开发者ID:dpawatts,项目名称:zeus,代码行数:9,代码来源:CredentialService.cs

示例13: VsoAadAuthentication

 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 internal VsoAadAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore,
     ITokenStore vsoIdeTokenCache,
     IVsoAuthority vsoAuthority)
     : base(personalAccessTokenStore,
            adaRefreshTokenStore,
            vsoIdeTokenCache,
            vsoAuthority)
 { }
开发者ID:dongruiqing,项目名称:Git-Credential-Manager-for-Windows,代码行数:13,代码来源:VsoAadAuthentication.cs

示例14: BaseVsoAuthentication

 /// <summary>
 /// Invoked by a derived classes implementation. Allows custom back-end implementations to be used.
 /// </summary>
 /// <param name="tokenScope">The desired scope of the acquired personal access token(s).</param>
 /// <param name="personalAccessTokenStore">The secret store for acquired personal access token(s).</param>
 /// <param name="adaRefreshTokenStore">The secret store for acquired Azure refresh token(s).</param>
 protected BaseVsoAuthentication(
     VsoTokenScope tokenScope,
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore = null)
     : this(tokenScope, personalAccessTokenStore)
 {
     this.AdaRefreshTokenStore = adaRefreshTokenStore ?? this.AdaRefreshTokenStore;
     this.VsoAdalTokenCache = new VsoAdalTokenCache();
     this.VsoIdeTokenCache = new TokenRegistry();
 }
开发者ID:dongruiqing,项目名称:Git-Credential-Manager-for-Windows,代码行数:16,代码来源:BaseVsoAuthentication.cs

示例15: VstsMsaAuthentication

 public VstsMsaAuthentication(
     VstsTokenScope tokenScope,
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore = null)
     : base(tokenScope,
            personalAccessTokenStore,
            adaRefreshTokenStore)
 {
     this.VstsAuthority = new VstsAzureAuthority(DefaultAuthorityHost);
 }
开发者ID:digitalinfinity,项目名称:Git-Credential-Manager-for-Windows,代码行数:10,代码来源:VstsMsaAuthentication.cs


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