/// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 internal VstsAadAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority vstsAuthority)
     : base(personalAccessTokenStore,
            vstsIdeTokenCache,
            vstsAuthority)
 { }
 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 internal VstsAadAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority vstsAuthority)
     : base(personalAccessTokenStore,
            vstsIdeTokenCache,
            vstsAuthority)
 {
 }
 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 /// <param name="personalAccessTokenStore"></param>
 /// <param name="adaRefreshTokenStore"></param>
 /// <param name="vstsIdeTokenCache"></param>
 /// <param name="liveAuthority"></param>
 internal VstsMsaAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority liveAuthority)
     : base(personalAccessTokenStore,
            adaRefreshTokenStore,
            vstsIdeTokenCache,
            liveAuthority)
 { }
Example #4
0
 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 /// <param name="personalAccessTokenStore"></param>
 /// <param name="adaRefreshTokenStore"></param>
 /// <param name="vstsIdeTokenCache"></param>
 /// <param name="liveAuthority"></param>
 internal VstsMsaAuthentication(
     RuntimeContext context,
     ICredentialStore personalAccessTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority liveAuthority)
     : base(context,
            personalAccessTokenStore,
            vstsIdeTokenCache,
            liveAuthority)
 {
 }
Example #5
0
 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 /// <param name="personalAccessTokenStore"></param>
 /// <param name="adaRefreshTokenStore"></param>
 /// <param name="vstsIdeTokenCache"></param>
 /// <param name="liveAuthority"></param>
 internal VstsMsaAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority liveAuthority)
     : base(personalAccessTokenStore,
            adaRefreshTokenStore,
            vstsIdeTokenCache,
            liveAuthority)
 {
 }
 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 internal VstsAadAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority vstsAuthority,
     string loginHint)
     : base(personalAccessTokenStore,
            vstsIdeTokenCache,
            vstsAuthority)
 {
     this.loginHint = loginHint;
 }
        internal BaseVstsAuthentication(
            ICredentialStore personalAccessTokenStore,
            ITokenStore vstsIdeTokenCache,
            IVstsAuthority vstsAuthority)
            : this(VstsTokenScope.ProfileRead, personalAccessTokenStore)
        {
            if (ReferenceEquals(vstsIdeTokenCache, null))
                throw new ArgumentNullException(nameof(vstsIdeTokenCache));
            if (ReferenceEquals(vstsAuthority, null))
                throw new ArgumentNullException(nameof(vstsAuthority));

            this.VstsIdeTokenCache = vstsIdeTokenCache;
            this.VstsAuthority = vstsAuthority;
            this.VstsAdalTokenCache = TokenCache.DefaultShared;
        }
Example #8
0
        internal BaseVstsAuthentication(
            ICredentialStore personalAccessTokenStore,
            ITokenStore adaRefreshTokenStore,
            ITokenStore vstsIdeTokenCache,
            IVstsAuthority vstsAuthority)
            : this(VstsTokenScope.ProfileRead, personalAccessTokenStore)
        {
            Debug.Assert(adaRefreshTokenStore != null, "The adaRefreshTokenStore paramter is null or invalid.");
            Debug.Assert(vstsIdeTokenCache != null, "The vstsIdeTokenCache paramter is null or invalid.");
            Debug.Assert(vstsAuthority != null, "The vstsAuthority paramter is null or invalid.");

            this.AdaRefreshTokenStore = adaRefreshTokenStore;
            this.VstsIdeTokenCache    = vstsIdeTokenCache;
            this.VstsAuthority        = vstsAuthority;
            this.VstsAdalTokenCache   = TokenCache.DefaultShared;
        }
        internal BaseVstsAuthentication(
            ICredentialStore personalAccessTokenStore,
            ITokenStore adaRefreshTokenStore,
            ITokenStore vstsIdeTokenCache,
            IVstsAuthority vstsAuthority)
            : this(VstsTokenScope.ProfileRead, personalAccessTokenStore)
        {
            Debug.Assert(adaRefreshTokenStore != null, "The adaRefreshTokenStore paramter is null or invalid.");
            Debug.Assert(vstsIdeTokenCache != null, "The vstsIdeTokenCache paramter is null or invalid.");
            Debug.Assert(vstsAuthority != null, "The vstsAuthority paramter is null or invalid.");

            this.AdaRefreshTokenStore = adaRefreshTokenStore;
            this.VstsIdeTokenCache = vstsIdeTokenCache;
            this.VstsAuthority = vstsAuthority;
            this.VstsAdalTokenCache = TokenCache.DefaultShared;
        }
        internal BaseVstsAuthentication(
            ICredentialStore personalAccessTokenStore,
            ITokenStore vstsIdeTokenCache,
            IVstsAuthority vstsAuthority)
            : this(VstsTokenScope.ProfileRead, personalAccessTokenStore)
        {
            if (vstsIdeTokenCache is null)
            {
                throw new ArgumentNullException(nameof(vstsIdeTokenCache));
            }
            if (vstsAuthority is null)
            {
                throw new ArgumentNullException(nameof(vstsAuthority));
            }

            VstsIdeTokenCache  = vstsIdeTokenCache;
            VstsAuthority      = vstsAuthority;
            VstsAdalTokenCache = TokenCache.DefaultShared;
        }