<commit_before>﻿using Microsoft.IdentityModel.Clients.ActiveDirectory;
using System;
using System.Diagnostics;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace Microsoft.TeamFoundation.Git.Helpers.Authentication
{
    public abstract class BaseVsoAuthentication : BaseAuthentication, IVsoAuthentication
    {
        public static readonly string DefaultResource = "499b84ac-1321-427f-aa17-267ca6975798";
        public static readonly Guid DefaultClientId = new Guid("872cd9fa-d31f-45e0-9eab-6e460a02d1f1");

        protected const string SecondaryCredentialPrefix = "alt-git";
        protected const string TokenPrefix = "adal-refresh";

        protected BaseVsoAuthentication(string authorityHostUrl)
        {
            this.AuthorityHostUrl = authorityHostUrl;
            this.ClientId = DefaultClientId;
            this.Resource = DefaultResource;
            this.PersonalAccessTokenStore = new CredentialStore(PrimaryCredentialPrefix);
            this.UserCredentialStore = new CredentialStore(SecondaryCredentialPrefix);
            this.AdaRefreshTokenStore = new TokenStore(TokenPrefix);
        }
        protected BaseVsoAuthentication(string authorityHostUrl, string resource, Guid clientId)
            : this(authorityHostUrl)
        {

            this.ClientId = clientId;
            this.Resource = resource;
        }
        internal BaseVsoAuthentication(string authorityHostUrl, ICredentialStore personalAccessToken, ICredentialStore userCredential, ITokenStore adaRefresh)
            : this(authorityHostUrl)
        {
            this.PersonalAccessTokenStore = personalAccessToken;
            this.UserCredentialStore = userCredential;
            this.AdaRefreshTokenStore = adaRefresh;
        }<commit_msg>turned off trace noise from ADAL<commit_after>﻿using Microsoft.IdentityModel.Clients.ActiveDirectory;
using System;
using System.Diagnostics;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace Microsoft.TeamFoundation.Git.Helpers.Authentication
{
    public abstract class BaseVsoAuthentication : BaseAuthentication, IVsoAuthentication
    {
        public static readonly string DefaultResource = "499b84ac-1321-427f-aa17-267ca6975798";
        public static readonly Guid DefaultClientId = new Guid("872cd9fa-d31f-45e0-9eab-6e460a02d1f1");

        protected const string SecondaryCredentialPrefix = "alt-git";
        protected const string TokenPrefix = "adal-refresh";

        protected BaseVsoAuthentication(string authorityHostUrl)
        {
            AdalTrace.TraceSource.Switch.Level = SourceLevels.Off;
            AdalTrace.LegacyTraceSwitch.Level = TraceLevel.Off;

            this.AuthorityHostUrl = authorityHostUrl;
            this.ClientId = DefaultClientId;
            this.Resource = DefaultResource;
            this.PersonalAccessTokenStore = new CredentialStore(PrimaryCredentialPrefix);
            this.UserCredentialStore = new CredentialStore(SecondaryCredentialPrefix);
            this.AdaRefreshTokenStore = new TokenStore(TokenPrefix);
        }
        protected BaseVsoAuthentication(string authorityHostUrl, string resource, Guid clientId)
            : this(authorityHostUrl)
        {

            this.ClientId = clientId;
            this.Resource = resource;
        }
        internal BaseVsoAuthentication(string authorityHostUrl, ICredentialStore personalAccessToken, ICredentialStore userCredential, ITokenStore adaRefresh)
            : this(authorityHostUrl)
        {
            this.PersonalAccessTokenStore = personalAccessToken;
            this.UserCredentialStore = userCredential;
            this.AdaRefreshTokenStore = adaRefresh;
        }
{'fraction_non_alphanumeric': 0.06766143555441215, 'fraction_numerical': 0.021610496526884487, 'mean_word_length': 3.2819383259911894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1979422', 'n_tokens_mistral': 1047, 'n_tokens_neox': 972, 'n_words': 199}